library(DT) x <- "disp" y <- "mpg" mod <- lm(mpg ~ disp, data = mtcars)
The graph below displays the relationship between r y and r x in a data set of r nrow(mtcars) observations.
plot(mtcars[[x]], mtcars[[y]], xlab = x, ylab = y)
Based on a linear model, we predict that the expected value of r y will increase by r coef(mod)[[2]] units for each one unit increase in r x.
The raw data is available to explore here:
datatable(mtcars)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.