checkTnF {tools} | R Documentation |
Checks the specified R code 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.
checkTnF(package, dir, file, lib.loc = NULL)
package |
a character string naming an installed package. If given, the installed R code of the package is 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 should contain the subdirectory |
file |
the name of a file containing R code to be checked. Used
if neither |
lib.loc |
a character vector of directory names of R libraries,
or |
An object of class "checkTnF"
which is a list with the
expressions found to contain T
or F
.
There is a print
method for nicely displaying the information
contained in such objects.
This function is still experimental. Both name and interface might change in future versions.