#| label = "DataNamePlot",
#| fig.cap = "Plot of {{ResponseName}} versus {{PredictorName}} with fitted
#| line added."
library(ggplot2)
{{DataName}} |> ggplot(aes(y=ResponseName, x=PredictorName)) + geom.point() + geom_smooth(method="lm")
#| label = "{{DataName}}.lm"
{{DataName}}.lm = lm({{ResponseName}} ~ {{PredictorName}}, data={{DataName}})
library(broom)
{{DataName}}.lm.aug = {{DataName}}.lm |> augment()
{{DataName}}.lm |> summary()
#| label = "glance{{DataName}}.lm"
{{DataName}}.lm |> glance() |> kable(caption="Summary statistics for {{DataName}}.lm.")
#| label = "plot{{DataName}}.lm",
#| fig.cap = "Residual analysis for {{DataName}}.lm"
library(ggfortify)
{{DataName}}.lm |> autoplot()


Try the BrailleR package in your browser

Any scripts or data that you put into this service are public.

BrailleR documentation built on July 26, 2023, 5:46 p.m.