The R Project SVN R

Rev

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

Rev 61605 Rev 61876
Line 12... Line 12...
12
##
12
##
13
ls.base <- c(ls("package:base"), ls("package:stats"))
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, is.real is deprecated
17
## is.single is a dummy
18
iroot <- iroot[-match(c("single", "real"), iroot)]
18
iroot <- iroot[-match("single", iroot)]
19
aroot <- substring(as.bi <- bi[substring(bi,1,3) == "as."],4)
19
aroot <- substring(as.bi <- bi[substring(bi,1,3) == "as."],4)
20
## eliminate as.foo methods: there are no is.foo methods
20
## eliminate as.foo methods: there are no is.foo methods
21
## this works because data.frame.*  has no other matches for data.
21
## this works because data.frame.*  has no other matches for data.
22
aroot <- aroot[!duplicated(sub("\\..*", "", aroot))]
22
aroot <- aroot[!duplicated(sub("\\..*", "", aroot))]
23
aroot <- aroot[-match("real", aroot)]
-
 
24
root <- intersect(iroot, aroot) # both an  is.foo and as.foo function exist
23
root <- intersect(iroot, aroot) # both an  is.foo and as.foo function exist
25
 
24
 
26
ex.list <- expression(integer(0), NULL, list(), 1:1, pi, "1.3", list(a=1),
25
ex.list <- expression(integer(0), NULL, list(), 1:1, pi, "1.3", list(a=1),
27
    as.data.frame(character(0)))
26
    as.data.frame(character(0)))
28
 
27