The R Project SVN R

Rev

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

Rev 26530 Rev 33606
Line 7... Line 7...
7
  tested.  If the object is valid, \code{TRUE} is returned; otherwise,
7
  tested.  If the object is valid, \code{TRUE} is returned; otherwise,
8
  either a vector of strings describing validity failures is returned,
8
  either a vector of strings describing validity failures is returned,
9
  or an error is generated (according to whether \code{test} is
9
  or an error is generated (according to whether \code{test} is
10
  \code{TRUE}).
10
  \code{TRUE}).
11
 
11
 
12
  The function \code{setValidity}  sets
12
  The function \code{setValidity} sets the validity method of a class
13
  the validity method of a class (but more normally, this method will
13
  (but more normally, this method will be supplied as the
14
  be supplied as the \code{validity} argument to \code{\link{setClass}}).  The method should be a function of one
14
  \code{validity} argument to \code{\link{setClass}}).  The method
-
 
15
  should be a function of one object that returns \code{TRUE} or a
15
  object that returns \code{TRUE} or a description of the non-validity.
16
  description of the non-validity.
16
}
17
}
17
\usage{
18
\usage{
18
validObject(object, test)
19
validObject(object, test = FALSE)
19
 
20
 
20
 setValidity(Class, method, where = topenv(parent.frame()) )
21
setValidity(Class, method, where = topenv(parent.frame()) )
21
}
22
}
22
\arguments{
23
\arguments{
23
  \item{object}{ Any object, but not much will happen unless the
24
  \item{object}{ Any object, but not much will happen unless the
24
    object's class has a formal definition.}
25
    object's class has a formal definition.}
25
  \item{test}{ If \code{test} is \code{TRUE}, and validity fails the
26
  \item{test}{ If \code{test} is \code{TRUE}, and validity fails the