Re                   package:onion                   R Documentation

_O_c_t_o_n_i_o_n _c_o_m_p_o_n_e_n_t_s

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

     Get or set each component of an onionic vector

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

     ## S3 method for class 'octonion':
     Re(z)
     ## S3 method for class 'octonion':
     Im(z)
     ## S3 method for class 'octonion':
     i(x)
     ## S3 method for class 'octonion':
     j(x)
     ## S3 method for class 'octonion':
     k(x)
     ## S3 method for class 'octonion':
     l(x)
     ## S3 method for class 'octonion':
     il(x)
     ## S3 method for class 'octonion':
     jl(x)
     ## S3 method for class 'octonion':
     kl(x)
     ## S3 replacement method for class 'octonion':
     Re(x) <- value
     ## S3 replacement method for class 'octonion':
     Im(x) <- value
     ## S3 replacement method for class 'octonion':
     i(x) <- value
     ## S3 replacement method for class 'octonion':
     j(x) <- value
     ## S3 replacement method for class 'octonion':
     k(x) <- value
     ## S3 replacement method for class 'octonion':
     l(x) <- value
     ## S3 replacement method for class 'octonion':
     il(x) <- value
     ## S3 replacement method for class 'octonion':
     jl(x) <- value
     ## S3 replacement method for class 'octonion':
     kl(x) <- value
     ## S3 method for class 'quaternion':
     Re(z)
     ## S3 method for class 'quaternion':
     Im(z)
     ## S3 method for class 'quaternion':
     i(x)
     ## S3 method for class 'quaternion':
     j(x)
     ## S3 method for class 'quaternion':
     k(x)
     ## S3 replacement method for class 'quaternion':
     Re(x) <- value
     ## S3 replacement method for class 'quaternion':
     Im(x) <- value
     ## S3 replacement method for class 'quaternion':
     i(x) <- value
     ## S3 replacement method for class 'quaternion':
     j(x) <- value
     ## S3 replacement method for class 'quaternion':
     k(x) <- value
     ## S3 method for class 'onion':
     get.comp(x,i)
     ## S3 replacement method for class 'onion':
     set.comp(x,i) <- value

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

     x,z: An onionic vector

   value: A real vector (or, in the case of 'Im<-()' and
          'set.comp<-()', an appropriately sized matrix)

       i: In functions 'get.comp()' and 'set.comp<-()', an integer
          between 1 and 2^n where n depends on the type of onion

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

     All return an onion of the appropriate class.

_N_o_t_e:

     In the case of 'Im<-' methods, if 'value' has the special value
     '0', then all the imaginary parts will be set to zero, as though
     one had typed 'Im(a) <- Im(a)*0'.  Note that setting value to
     'rep(0,length(x))' will _not_ work; neither will 'Im(x) <- 3'
     (say).

     These functions are all specific to their algebra; there is no
     onionic generalization.  This is because the code is more
     structured. It also makes it easier to change the names of the
     bases.

     Functions 'get.comp()' and the various methods for 'set.comp<-()'
     are not really intended for the end-user. It is better to use
     idioms such as 'il(x)' and 'i(x) <- 4'

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

     Robin K. S. Hankin

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

     'octonion'

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

     x <- octonion(Re=1,il=1:3,j=3:1)
     Re(x)
     kl(x) <- 1000

