\HeaderA{checkTnF}{Check R Packages or Code for T/F}{checkTnF}
\aliasA{print.checkTnF}{checkTnF}{print.checkTnF}
\keyword{utilities}{checkTnF}
\keyword{documentation}{checkTnF}
\begin{Description}\relax
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 which
are set to the logicals \code{TRUE} and \code{FALSE} by default, but
are not reserved words and hence can be overwritten by the user.
Hence, one should always use \code{TRUE} and \code{FALSE} for the
logicals.
\end{Description}
\begin{Usage}
\begin{verbatim}
checkTnF(package, dir, file, lib.loc = NULL)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{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.
\item[\code{dir}] a character string specifying the path to a package's root
source directory.  This must contain the subdirectory \file{R} (for
R code), and should also contain \file{man} (for documentation).
Only used if \code{package} is not given.  If used, the R code files
and the examples in the documentation files are checked.
\item[\code{file}] the name of a file containing R code to be checked.  Used
if neither \code{package} nor \code{dir} are given.
\item[\code{lib.loc}] a character vector of directory names of \R{} libraries,
or \code{NULL}.  The default value of \code{NULL} corresponds to all
libraries currently known.  The specified library trees are used to
to search for \code{package}.
\end{ldescription}
\end{Arguments}
\begin{Value}
An object of class \code{"checkTnF"} which is a list containing, for
each file where occurrences of \code{T} or \code{F} were found, a list
with the expressions containing these occurrences.  The names of the
list are the corresponding file names.

There is a \code{print} method for nicely displaying the information
contained in such objects.
\end{Value}
\begin{Section}{Warning}
This function is still experimental.  Both name and interface might
change in future versions.
\end{Section}

