pythagoras {ggfields} | R Documentation |
A helper function to calculate vector lengths
Description
Calculates the length of a vector using the Pythagorean theorem.
Usage
pythagoras(x, y)
Arguments
x |
A |
y |
A |
Value
Returns a numeric
vector
with the same length as x
and y
,
reflecting the lengths of the hypotenuse of the right triangles.
Author(s)
Pepijn de Vries
Examples
pythagoras(x = c(1, 2), y = c(1, 2))
[Package ggfields version 0.0.6 Index]