checkTnF                package:tools                R Documentation

_C_h_e_c_k _R _P_a_c_k_a_g_e_s _o_r _C_o_d_e _f_o_r _T/_F

_D_e_s_c_r_i_p_t_i_o_n:

     Checks the specified R package or code file for occurrences of 'T'
     or 'F', and gathers the expression containing these. This is
     useful as in R 'T' and 'F' are just variables which are set to the
     logicals 'TRUE' and 'FALSE' by default, but are not reserved words
     and hence can be overwritten by the user. Hence, one should always
     use 'TRUE' and 'FALSE' for the logicals.

_U_s_a_g_e:

     checkTnF(package, dir, file, lib.loc = NULL)

_A_r_g_u_m_e_n_t_s:

 package: a character string naming an installed package.  If given,
          the installed R code and the examples in the documentation
          files of the package are checked.  R code installed as an
          image file cannot be checked.

     dir: a character string specifying the path to a package's root
          source directory.  This must contain the subdirectory 'R'
          (for R code), and should also contain 'man' (for
          documentation). Only used if 'package' is not given.  If
          used, the R code files and the examples in the documentation
          files are checked.

    file: the name of a file containing R code to be checked.  Used if
          neither 'package' nor 'dir' are given.

 lib.loc: a character vector of directory names of R libraries, or
          'NULL'.  The default value of 'NULL' corresponds to all
          libraries currently known.  The specified library trees are
          used to search for 'package'.

_V_a_l_u_e:

     An object of class '"checkTnF"' which is a list containing, for
     each file where occurrences of 'T' or 'F' were found, a list with
     the expressions containing these occurrences.  The names of the
     list are the corresponding file names.

     There is a 'print' method for nicely displaying the information
     contained in such objects.

_W_a_r_n_i_n_g:

     This function is still experimental.  Both name and interface
     might change in future versions.

