View source: R/coordinate-transformations.R
rotate_coords | R Documentation |
Perform a mathematical rotation about (0, 0) of coordinates. This rotation is given as x' = x \* cos(theta) - y \* sin(theta) y' = x \* sin(theta) + y \* cos(theta)
rotate_coords(df, angle = 90)
df |
The data frame to rotate. It must have |
angle |
the angle (in degrees) through which to rotate the coordinates |
The rotated data frame
rotate_coords(data.frame(x = 0, y = 1))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.