Perform a mathematical reflection of coordinates over a specified axis
Source:R/coordinate-transformations.R
reflect.Rd
Perform a mathematical reflection of coordinates over a specified axis
Arguments
- df
The data frame to reflect. It must have
x
andy
columns- over_x
A boolean indicating whether or not to reflect over the x axis. Default: FALSE
- over_y
A boolean indicating whether or not to reflect over the y axis. Default: TRUE
Examples
reflect(data.frame(x = 1, y = 0))
#> x y
#> 1 -1 0