line_parameters {cities}R Documentation

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)

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

Value

Vector of slope and intercept for equation of line.

Examples

line_parameters(1,2,4,2)

[Package cities version 0.1.3 Index]