plot_cor | R Documentation |
Plots a scatter plot of x and y and includes a regression line.
plot_cor(dataset, xvar, yvar)
dataset |
a data frame or tibble |
xvar |
variable to plot on the x axis, as a character string. NA values are silently dropped. |
yvar |
variable to plot on the y axis, as a character string. NA values are silently dropped. |
A ggplot object which may be further customised with e.g. theme() options.
plot_cor(mtcars, "wt", "mpg")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.