Rotates a set of points.
rotation(x, y, rot = 90, xrot = mean(x), yrot = mean(y), rad = FALSE)
x, y | x and y coordinates of points. |
---|---|
rot | angle of the rotation expressed in degree. |
xrot | optional, x coordinate for the center of rotation. |
yrot | optional, y coordinate for the center of rotation. |
rad | logical. Should radian be used rather than degrees? |
Returns the coordinates of the points after rotation. If the coordinates of the rotation center are not specified, then the rotation center is the centroid of the points to be rotated.