The R Project SVN R

Rev

Rev 18642 | Rev 42333 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 18642 Rev 20524
Line 1... Line 1...
1
\name{checkTnF}
1
\name{checkTnF}
2
\alias{checkTnF}
2
\alias{checkTnF}
3
\alias{print.checkTnF}
3
\alias{print.checkTnF}
4
\title{Check R Code for T/F}
4
\title{Check R Packages or Code for T/F}
5
\description{
5
\description{
6
  Checks the specified R code for occurrences of \code{T} or \code{F},
6
  Checks the specified R package or code file for occurrences of
7
  and gathers the expression containing these.  This is useful as in R
7
  \code{T} or \code{F}, and gathers the expression containing these.
8
  \code{T} and \code{F} are just variables which are set to the logicals
8
  This is useful as in R \code{T} and \code{F} are just variables which
9
  \code{TRUE} and \code{FALSE} by default, but are not reserved words
9
  are set to the logicals \code{TRUE} and \code{FALSE} by default, but
10
  and hence can be overwritten by the user.  Hence, one should always
10
  are not reserved words and hence can be overwritten by the user.
11
  use \code{TRUE} and \code{FALSE} for the logicals.
11
  Hence, one should always use \code{TRUE} and \code{FALSE} for the
-
 
12
  logicals.
12
}
13
}
13
\usage{
14
\usage{
14
checkTnF(package, dir, file, lib.loc = NULL)
15
checkTnF(package, dir, file, lib.loc = NULL)
15
}
16
}
16
\arguments{
17
\arguments{
17
  \item{package}{a character string naming an installed package.  If
18
  \item{package}{a character string naming an installed package.  If
18
    given, the installed R code of the package is checked.  R code
19
    given, the installed R code and the examples in the documentation
-
 
20
    files of the package are checked.  R code installed as an image file
19
    installed as an image file cannot be checked.}
21
    cannot be checked.}
20
  \item{dir}{a character string specifying the path to a package's root
22
  \item{dir}{a character string specifying the path to a package's root
21
    source directory.  This should contain the subdirectory \code{R}
23
    source directory.  This must contain the subdirectory \file{R} (for
-
 
24
    R code), and should also contain \file{man} (for documentation).
22
    (for R code).  Only used if \code{package} is not given.}
25
    Only used if \code{package} is not given.  If used, the R code files
-
 
26
    and the examples in the documentation files are checked.}
23
  \item{file}{the name of a file containing R code to be checked.  Used
27
  \item{file}{the name of a file containing R code to be checked.  Used
24
    if neither \code{package} nor \code{dir} are given.}
28
    if neither \code{package} nor \code{dir} are given.}
25
  \item{lib.loc}{a character vector of directory names of \R libraries,
29
  \item{lib.loc}{a character vector of directory names of \R libraries,
26
    or \code{NULL}.  The default value of \code{NULL} corresponds to all
30
    or \code{NULL}.  The default value of \code{NULL} corresponds to all
27
    libraries currently known.  The specified library trees are used to
31
    libraries currently known.  The specified library trees are used to
28
    to search for \code{package}.}
32
    to search for \code{package}.}
29
}
33
}
30
\value{
34
\value{
31
  An object of class \code{"checkTnF"} which is a list with the
35
  An object of class \code{"checkTnF"} which is a list containing, for
32
  expressions found to contain \code{T} or \code{F}.
36
  each file where occurences of \code{T} or \code{F} were found, a list
-
 
37
  with the expressions containing these occurrences.  The names of the
-
 
38
  list are the corresponding file names.
33
 
39
 
34
  There is a \code{print} method for nicely displaying the information
40
  There is a \code{print} method for nicely displaying the information
35
  contained in such objects.
41
  contained in such objects.
36
}
42
}
37
\section{Warning}{
43
\section{Warning}{