lineval | R Documentation |
Given two points, (x1,y1) and (x2,y2) and a dataset X, the function spills out a vector Y
Y is the sequence of values of the line for the corresponding values of X
lineval(v1, v2, X)
v1 , v2 |
Two element numeric (atomic) vectors |
X |
Numeric sequence for which Y values are required |
The return type is a numeric vector(Y) with the same length as X
Chitran Ghosal
X <- seq(0, 20, by=0.01)
v1 <- (0,0)
v2 <- (3,4)
Y <- lineval(v1, v2, X)
plot(X, Y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.