shift                  package:secr                  R Documentation

_S_h_i_f_t _P_o_i_n_t_s

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

     Translate an array of points.

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

     shift (object, shiftxy, ...)

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

  object: a 2-column matrix or object that can be coerced to a matrix 

 shiftxy: vector of x and y displacements 

     ...: other arguments (not used) 

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

     This is a generic function. The default method is redundant, but
     the method for 'traps' objects may be useful.

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

     A matrix with the location of each point shifted by the desired
     amount.

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

     Murray Efford murray.efford@otago.ac.nz

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

     'rotate', 'flip'

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

     temp <- matrix(runif (20) * 2 - 1, nc = 2)
     temp2 <- shift(temp, c(0.1, 0.1))
     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) 

