Description Usage Arguments Value Author(s) See Also Examples
Calculates the linear fit of a set of points using lm
.
This function returns the coefficients that best approximate the
set of points according to the equation
y = a1 + a2*x
The function returns the vector c(a1, a2)
.
1 | linearFit(x, y)
|
x |
Vector containing x coordinates of the points. |
y |
Vector containing y coordinates of the points. |
Vector with fit coefficients.
Paulo José Saiz Jabardo
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.