| rotate | R Documentation |
rotate calculates the coordinates for a point (x,y) after it rotates by an angle theta (radian)
rotate(xy, theta = 0)
xy |
A vector of length 2 representing the coordinates of a point in cartesian system |
theta |
A number rotating angle in radian |
Coordinates of the point after the rotation
rotate(c(1000, 0), theta=pi/6)