shift_line | R Documentation |
Given an x vector of at least 2 points, a corresponding y vector of equal length, and a distance to shift the line, shift a SLANTED line "up" or "down", in the direction perpendicular to the line.
shift_line(x, y, dist = 1, dir = "up")
x |
Numeric vector, length >=2. |
y |
Numeric vector, same length as x. |
dist |
Numeric value, how far to shift the line. |
dir |
String, either "up" or "down". |
Named list containing the new x and y vectors.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.