https://github.com/cran/fda
Tip revision: 162fdbd4bc36e851c7abd22dd9b35cd24527f8e0 authored by J. O. Ramsay on 03 November 2009, 00:00:00 UTC
version 2.3.2
version 2.3.2
Tip revision: 162fdbd
CRAN.Rd
\name{CRAN}
\alias{CRAN}
\title{
Test if running as CRAN
}
\description{
This function allows package developers to run tests themselves that
should not run on CRAN or with "R CMD check --as-cran" because of
compute time constraints with CRAN tests.
}
\usage{
CRAN(x='_R_CHECK_TIMINGS_')
}
\arguments{
\item{x}{
name of an environmental variable to check.
}
}
\details{
x. <- Sys.getenv(x)
xl <- as.logical(x.)
return((!is.na(xl)) || xl)
This returns FALSE either if the environmental variable is not found
or it is not TRUE.
Duncan Murdoch noted that the following variables are set by
"--as-cran": _R_CHECK_TIMINGS_, _R_CHECK_INSTALL_DEPENDS_,
_R_CHECK_NO_RECOMMENDED_, and _R_SHLIB_BUILD_OBJECTS_SYMBOL_TABLES_.
For this purpose, he suggested we use the first.
}
\value{
a logical scalar
}
%\seealso{}
\examples{
\dontrun{
cran <- CRAN()
str(cran)
print(cran)
stop()
if(CRAN()){
stop('CRAN')
} else {
stop('NOT CRAN')
}
}
}
\keyword{environment}