The R Project SVN R

Rev

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

Rev 23039 Rev 27443
Line 8... Line 8...
8
## Also check idempotency: as.foo(as.foo(x)) == as.foo(x)
8
## Also check idempotency: as.foo(as.foo(x)) == as.foo(x)
9
## and that as.foo(x) == x iff is.foo(x) is true.
9
## and that as.foo(x) == x iff is.foo(x) is true.
10
##
10
##
11
## One problem with the last is that no realistic x's are used.
11
## One problem with the last is that no realistic x's are used.
12
##
12
##
13
ls.base <- ls("package:base")
13
ls.base <- c(ls("package:base"), ls("package:stats"))
14
base.is.f <- sapply(ls.base, function(x) is.function(get(x)))
14
base.is.f <- sapply(ls.base, function(x) is.function(get(x)))
15
bi <- ls.base[base.is.f]
15
bi <- ls.base[base.is.f]
16
iroot <- substring(is.bi <- bi[substring(bi,1,3) == "is."],4)
16
iroot <- substring(is.bi <- bi[substring(bi,1,3) == "is."],4)
17
## is.single is a dummy
17
## is.single is a dummy
18
iroot <- iroot[-match("single", iroot)]
18
iroot <- iroot[-match("single", iroot)]