Topic: Utilities

Topic Description:

Basic R utilities used in many packages and functions, such as date and string manipulations, statistical distributions, geometry of lines and distances. The R package date is required for the two data functions.



File: utilities/geometry.r

View File Source Download File No help file available

Function: line.intersection.pts

Function Description: line.intersection.pts

Finds the point where 2 lines intersect, given each line as 2 pairs of points on the line

Function Arguments:

ArgumentDefault Value
pts1
pts2

Function Source:

line.intersection.pts=function(pts1,pts2)
{
line1=slope.intercept.frompts(pts1)
line2=slope.intercept.frompts(pts2)

return(line.intersection(line1[1],line1[2],line2[1],line2[2]))
}