Math                  package:spam                  R Documentation

_M_a_t_h_e_m_a_t_i_c_a_l _f_u_n_c_t_i_o_n_s

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

     Applies the 'Math' group functions to ''spam'' objects

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

     # ceiling(x)
     # floor(x)

     # exp(x, base = exp(1))
     # log(x, base = exp(1))
     # sqrt(x)

     # abs(x)
     # cumprod(x)
     # cumsum(x)

     # cos(x)
     # sin(x)
     # tan(x)
     # acosh(x)
     ...

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

       x: spam object.

    base: positive number.  The base with respect to which logarithms
          are computed.  Defaults to 'e=exp(1)'.

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

     It is important to note that the zero entries do not enter the
     evaluation. The operations are performed on the stored non-zero
     elements. This may lead to differences if compared with the same
     operation on a full matrix. For example, the cosine of sparse
     matrix is a (full) matrix with many ones.

     Evaluating function resulting in NA/NaN/Inf is possible but the
     result cannot be used further as NA/NaN/Inf are not meaningful
     (yet).

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

     All functions operate on the vector 'x@entries' and return the
     result thereof.

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

     Reinhard Furrer

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

     'Math2'

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

     getGroupMembers("Math")

     mat <- matrix(c( 1,2,0,3,0,0,0,4,5),3)
     smat <- as.spam( mat)
     cos( mat)
     cos( smat)

     sqrt( smat)

