powered by
rotate calculates the coordinates for a point (x,y) after it rotates by an angle theta (radian)
rotate
rotate(xy, theta = 0)
A vector of length 2 representing the coordinates of a point in cartesian system
A number rotating angle in radian
Coordinates of the point after the rotation
# NOT RUN { rotate(c(1000, 0), theta=pi/6) # }
Run the code above in your browser using DataLab