rotate                 package:secr                 R Documentation

_R_o_t_a_t_e _P_o_i_n_t_s

_D_e_s_c_r_i_p_t_i_o_n:

     Rotate a set of points.

_U_s_a_g_e:

     rotate (object, degrees, centrexy = NULL, ...)

_A_r_g_u_m_e_n_t_s:

  object: object that may be coerced to a numeric matrix 

 degrees: clockwise angle of rotation in degrees 

centrexy: vector with xy coordinates of rotation centre 

     ...: other arguments (not used) 

_D_e_t_a_i_l_s:

     The first column of 'object' holds the x coordinates of the points
     and the second holds the y coordinates. If 'centrexy' is NULL then
     rotation is about (0,0).

     A generic method, introduced for the class-specific method
     'rotate.traps'.

_V_a_l_u_e:

     A matrix with the location of each point rotated about the centre.

_A_u_t_h_o_r(_s):

     Murray Efford murray.efford@otago.ac.nz

_S_e_e _A_l_s_o:

     'shift'

_E_x_a_m_p_l_e_s:

     temp <- matrix(runif (20) * 2 - 1, nc = 2)
     temp2 <- rotate(temp, 25)
     plot(temp, xlim=c(-1.5,1.5), ylim = c(-1.5,1.5), pch = 16)
     points (0,0, pch=2)
     points (temp2, pch = 1)
     arrows (temp[,1], temp[,2], temp2[,1], temp2[,2], length = 0.1) 

