lf_fromPoints: linear function from 2 points

lf_fromPointsR Documentation

linear function from 2 points

Description

get linear fuction from 2 points x1 and x2

Usage

lf_fromPoints(x, ...)

Arguments

x

matrix or data frame of points just first point

...

second point

Value

matrix with slope and intercept

Author(s)

Florian Wagner florian.wagner@wagnius.ch

Examples

lf_fromPoints(c(0,0),c(1,1))
Points <- rbind(c(-2,5),
           c( 3,3))
result <- lf_fromPoints(Points)
result
plot(Points, asp = 0, xlab = "x", ylab = "y")
abline(result[,2],result[,1])

wagnius-GmbH/slvwagner documentation built on Jan. 19, 2025, 7:10 a.m.