The R Project SVN R

Rev

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

Rev 25351 Rev 26000
Line 91... Line 91...
91
## a class union containing the existing class  union "OptionalFunction"
91
## a class union containing the existing class  union "OptionalFunction"
92
setClassUnion("maybeCode",
92
setClassUnion("maybeCode",
93
    c("expression", "language", "OptionalFunction"))
93
    c("expression", "language", "OptionalFunction"))
94
 
94
 
95
is(quote(sqrt(1:10)), "maybeCode")  ## TRUE
95
is(quote(sqrt(1:10)), "maybeCode")  ## TRUE
96
\testonly{
96
\dontshow{
97
## The following test is less trivial than it looks.
97
## The following test is less trivial than it looks.
98
## It depends on the assignment of the data part NOT performing a
98
## It depends on the assignment of the data part NOT performing a
99
## strict coerce to "numeric" on the way to satisfying
99
## strict coerce to "numeric" on the way to satisfying
100
## is(ttt, "maybeNumber").
100
## is(ttt, "maybeNumber").
101
stopifnot(identical(w1@.Data, 1:10))
101
stopifnot(identical(w1@.Data, 1:10))