Learn R Programming

pcds (version 0.1.2)

slope: The slope of a line

Description

Returns the slope of the line joining two distinct 2D points a and b.

Usage

slope(a, b)

Arguments

a, b

2D points that determine the straight line (i.e., through which the straight line passes).

Value

Slope of the line joining 2D points a and b

See Also

Line, paraline, and perpline

Examples

Run this code
# NOT RUN {
A<-c(-1.22,-2.33); B<-c(2.55,3.75)
slope(A,B)

slope(c(1,2),c(2,3))
slope(c(1,2),c(1,3))

# }

Run the code above in your browser using DataLab