powered by
rotate (xy, angle, degrees = FALSE)
## rotate points in a 2D space mat = cbind (1:100, 100:1) rotate (mat, pi/2) ## rotate complex-valued numbers complx = complex (real = mat[,1], imaginary = mat[,2]) rotate (complx, pi/2)
Run the code above in your browser using DataLab