shift_line: Shift line

View source: R/math_funcs.R

shift_lineR Documentation

Shift line

Description

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.

Usage

shift_line(x, y, dist = 1, dir = "up")

Arguments

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".

Value

Named list containing the new x and y vectors.


BIO-RSG/oceancolouR documentation built on April 30, 2024, 7:54 a.m.