Description Usage Arguments Value Author(s) Examples
Scatterplot with intercept and slope of ‘best fit’ line specified by user.
1 | best.fit.line(df=NULL, a, b)
|
df |
A dataframe comprising 2 numeric vectors, with values of X in the first column and values of Y in the second. |
a |
The intercept for the line of fit to be added to a scatterplot of Y given X |
b |
The slope for the line of fit to be added to a scatterlot of Y given X |
Returns a scatterplot, with added line of fit with intercept a and slope b. Also reports the equation of line being fitted, plus total sum of squares for that line.
Paul Williamson
1 | best.fit.line(survey[ , c("Height", "Income")], 28000, -20)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.