Rev 59039 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed
% File src/library/tools/man/checkTnF.Rd% Part of the R package, https://www.R-project.org% Copyright 1995-2007 R Core Team% Distributed under GPL 2 or later\name{checkTnF}\alias{checkTnF}\alias{print.checkTnF}\title{Check R Packages or Code for T/F}\description{Checks the specified R package or code file for occurrences of\code{T} or \code{F}, and gathers the expression containing these.This is useful as in R \code{T} and \code{F} are just variables whichare set to the logicals \code{TRUE} and \code{FALSE} by default, butare not reserved words and hence can be overwritten by the user.Hence, one should always use \code{TRUE} and \code{FALSE} for thelogicals.}\usage{checkTnF(package, dir, file, lib.loc = NULL)}\arguments{\item{package}{a character string naming an installed package. Ifgiven, the installed R code and the examples in the documentationfiles of the package are checked. R code installed as an image filecannot be checked.}\item{dir}{a character string specifying the path to a package's rootsource directory. This must contain the subdirectory \file{R} (forR code), and should also contain \file{man} (for documentation).Only used if \code{package} is not given. If used, the R code filesand the examples in the documentation files are checked.}\item{file}{the name of a file containing R code to be checked. Usedif neither \code{package} nor \code{dir} are given.}\item{lib.loc}{a character vector of directory names of \R libraries,or \code{NULL}. The default value of \code{NULL} corresponds to alllibraries currently known. The specified library trees are used tosearch for \code{package}.}}\value{An object of class \code{"checkTnF"} which is a list containing, foreach file where occurrences of \code{T} or \code{F} were found, a listwith the expressions containing these occurrences. The names of thelist are the corresponding file names.There is a \code{print} method for nicely displaying the informationcontained in such objects.}\keyword{utilities}\keyword{documentation}