verify                package:verify                R Documentation

_T_e_s_t _S_u_i_t_e

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

     'verify' is a generic function that creates or uses an object of
     class '"verify"' to check returned values of R functions.

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

     verify(x, ...)
     verify.default(x, data = list(), ...)
     verify.verify(x, ...)

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

       x: either a vector of character strings that are commands to  be
          tested, or an object of class '"verify"'. 
           If a character vector is given, it is often useful if it has
          names  that summarize the commands. 

    data: a named list of data to use in the commands. 

     ...: generic arguments. 

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

     The commands may include the output from previous commands in the
     object. The result of any previous command is available as `Test.'
     plus the name of the test. The index number is used if there are
     no names.

     'verify' is valuable to insure that changes in the code, the R
     version, the operating system or the hardware do not change
     (substantially) the results of the tested commands.

     There is a 'print' method for the '"verify"' class of objects.
     There is also a method for '['.

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

     an object of class '"verify"' that is a list of the results of the
      commands. In addition to 'class' and possibly 'names', it has the
      following attributes: 

    data: the input or default value of 'data'.

  passed: a logical vector, or a list that is the result  of
          'all.equal' on the new versus original results  for each
          command.

random.seed: the random seed needed to reproduce results that  depend
          on the random number generator.

specifics: a list providing the details of how and when the  object was
          created.

_N_o_t_e:

     If any of the commands require random numbers, then 
     '.Random.seed' is created or changed in the current directory.

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

     Nick Efthymiou

_R_e_f_e_r_e_n_c_e_s:

     S Poetry, Patrick J. Burns, Section 3.6, p. 52-58, <URL:
     www.seanet.com/~pburns/Spoetry>

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

     'print.verify', 'all.equal'

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

     ## Not run: 
     jjverif <- dget(file.path("tests", "jjverif"))
     print(verify(jjverif),short=TRUE)
     jjdig <- dget(file.path("tests", "jjdig"))
     jjg <- dget(file.path("tests", "jjg"))
     save(list = ls(pattern="jj"), 
          file=file.path("tests", "jjverifgraph.rda"), 
          ascii=TRUE, compress=TRUE)
     load(file.path("tests", "jjverifgraph.rda"))
     verify(jjverifgraph)
     # Exclude two tests that use empty mathgraph()
     print(verify(jjverifgraph[c(-4,-13)]), short = TRUE)
     ## End(Not run)

