options                 package:spam                 R Documentation

_O_p_t_i_o_n_s _S_e_t_t_i_n_g_s

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

     Allow the user to set and examine a variety of _options_ which
     affect the way in which R computes and displays sparse matrix
     results.

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

     spam.options(...)

     spam.getOption(x)

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

     ...: any options can be defined, using 'name = value' or by
          passing a list of such tagged values.  However, only the ones
          below are used in 'spam'. Further, 'spam.options('name') ==
          spam.options()['name']', see the example. 

       x: a character string holding an option name.

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

     Invoking 'spam.options()' with no arguments returns a list with
     the current values of the options. To access the value of a single
     option, one should use 'spam.getOption("eps")', e.g., rather than
     'spam.options("eps")' which is a _list_ of length one.

     Internally, the options are kept in the list '.Spam'.

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

     For 'spam.getOption', the current value set for option 'x', or
     'NULL' if the option is unset.

     For 'spam.options()', a list of all set options sorted by
     category.  For 'spam.options(name)', a list of length one
     containing the set value, or 'NULL' if it is unset.  For uses
     setting one or more options, a list with the previous values of
     the options changed (returned invisibly).

_O_p_t_i_o_n_s _u_s_e_d:

     A short description with the default values follows.

     '_e_p_s=._M_a_c_h_i_n_e$_d_o_u_b_l_e._e_p_s': values smaller than this are considered
          as zero. This is only used when creating spam objects.

     '_d_r_o_p=_F_A_L_S_E': default parameter for 'drop' when subsetting

     '_p_r_i_n_t_s_i_z_e=_1_0_0': the max number of elements of a matrix which we
          display as regular matrix.

     '_i_m_a_g_e_s_i_z_e=_1_0_0_0_0': the max number of elements of a matrix we
          display as regular matrix with 'image' or 'display'. Larger
          matrices are represented as dots only.

     '_t_r_i_v_a_l_u_e_s=_F_A_L_S_E': a flag whether to return the structure 
          ('FALSE') or the values themselves ('TRUE') when returning
          the upper and lower triangular part of a matrix.

     '_c_e_x=_1_2_0_0': default dot size for  'image' or 'display'.

     '_d_o_p_i_v_o_t_i_n_g=_T_R_U_E': default parameter for "solve" routines. 'FALSE'
          would solve the system without using the permutation.

     '_s_a_f_e_m_o_d_e=_c(_T_R_U_E,_T_R_U_E,_T_R_U_E)': The logicals are determine (1) 
          verify double and integer formats when constructing 'spam'
          objects (2) quick sanity check when constructing sparse
          matrices (3) testing for NAs in Fortan calls. 'TRUE's are
          safer but slightly slower. The most relevant speedup is the
          second flag.

     '_c_h_o_l_s_y_m_m_e_t_r_y_c_h_e_c_k=_T_R_U_E': for the Cholesky factorization, verify
          if the matrix is symmetric.

     '_c_h_o_l_p_i_v_o_t_c_h_e_c_k=_T_R_U_E': for the Cholesky factorization, when
          passing a permutation, should a minimum set of checks be
          performed?

     '_c_h_o_l_u_p_d_a_t_e_s_i_n_g_u_l_a_r="_w_a_r_n_i_n_g"': for a Cholesky update, what
          happens if the matrix is singular: '"warning"' only and
          returning the not updated factor, '"error"'  or  return
          simply '"NULL"'.

     '_c_h_o_l_i_n_c_r_e_a_s_e_f_a_c_t_o_r=_c(_1._2_5,_1._2_5)': If not enought memory could be
          allocated, these are the steps to increase it.

     '_n_n_z_n_e_a_r_e_s_t_d_i_s_t_n_n_z=_c(_4_0_0^_2,_4_0_0)': Memory allocation parameters for
          'nearest.dist'.

     '_n_e_a_r_e_s_t_d_i_s_t_i_n_c_r_e_a_s_e_f_a_c_t_o_r=_1._2_5': If not enought memory could be
          allocated, this is the step to increase it. 

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

     'spam.options' is essentially identical to 'sm.options'.

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

     'print', 'display',  'image', 'upper.tri', 'chol', 'nearest.dist',
     etc.

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

     op <- spam.options()

     # two ways of representing the options nicely.
     utils::str(op)
     noquote(unlist(format(op)) )

     smat <- diag.spam( 1:8)
     smat
     spam.options( printsize=49)
     smat

     # Reset to default values:
     spam.options( eps=.Machine$double.eps, drop=FALSE,             
        printsize=100,  imagesize=10000,   cex=1200, 
        trivalues=FALSE,   safemode=c(TRUE,TRUE,TRUE), 
        dopivoting=TRUE,       cholsymmetrycheck=TRUE,  
        cholpivotcheck=TRUE, cholupdatesingular="warning",
        cholincreasefactor=c(1.25,1.25),
        nearestdistincreasefactor=1.25,
        nearestdistnnz=c(400^2,400)     )

