Learn R Programming

cities (version 0.1.3)

line_parameters: line_parameters

Description

Helper function that returns slope and intercept for line equation using two points in the cartesian plot: (x1, x2) and (y1, y2)

Usage

line_parameters(x1, y1, x2, y2)

Value

Vector of slope and intercept for equation of line.

Arguments

x1

first value of the point (x1, x2) in the cartesian plot

y1

first value of the point (y1, y2) in the cartesian plot

x2

second value of the point (x1, x2) in the cartesian plot

y2

second value of the point (y1, y2) in the cartesian plot

Examples

Run this code
line_parameters(1,2,4,2)

Run the code above in your browser using DataLab