chem_scatter | R Documentation |
Creates a scatterplot with regression line
chem_scatter(data, xvar, yvar, xlab = "Insert X-axis label", ylab = "Insert Y-axis label", intercept = NULL, reg_line = TRUE)
data |
A data frame containing variables to be plotted |
xvar |
The name of the x-variable |
yvar |
The name of the y-variable |
xlab |
A string containing the x-axis label |
ylab |
A string containing the y-axis label |
intercept |
Set to NULL by default, but can be changed to a numeric value
to force the regression to through a specified y-value. For example,
|
reg_line |
Set to TRUE by default to show the regression line. If set to FALSE no regression line will appear showing only the points |
A plot
## Not run: chem_scatter(iris, Sepal.Width, Sepal.Length) ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.