The R Project SVN R

Rev

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

Rev 16032 Rev 19083
Line 67... Line 67...
67
	eval.parent(substitute(missing(x)))
67
	eval.parent(substitute(missing(x)))
68
}
68
}
69
g <- function(...) h(f(...))
69
g <- function(...) h(f(...))
70
h <- function(...) list(...)
70
h <- function(...) list(...)
71
k <- function(...) g(...)
71
k <- function(...) g(...)
72
X <- k(a=) 
72
X <- k(a=)
73
all.equal(X, list(TRUE))
73
all.equal(X, list(TRUE))
74
 
74
 
75
## Bug PR#24
75
## Bug PR#24
76
f <- function(x,...) substitute(list(x,...))
76
f <- function(x,...) substitute(list(x,...))
77
deparse(f(a, b)) == "list(a, b)" &&
77
deparse(f(a, b)) == "list(a, b)" &&
Line 103... Line 103...
103
## PR #656 (related)
103
## PR #656 (related)
104
u <- runif(1);	length(find(".Random.seed")) == 1
104
u <- runif(1);	length(find(".Random.seed")) == 1
105
 
105
 
106
MyVaR <<- "val";length(find("MyVaR")) == 1
106
MyVaR <<- "val";length(find("MyVaR")) == 1
107
rm(MyVaR);	length(find("MyVaR")) == 0
107
rm(MyVaR);	length(find("MyVaR")) == 0
-
 
108
 
-
 
109
 
-
 
110
## Martin Maechler: rare bad bug in sys.function() {or match.arg()} (PR#1409)
-
 
111
callme <- function(a = 1, mm = c("Abc", "Bde")) {
-
 
112
    mm <- match.arg(mm); cat("mm = "); str(mm) ; invisible()
-
 
113
}
-
 
114
## The first two were as desired:
-
 
115
callme()
-
 
116
callme(mm="B")
-
 
117
mycaller <- function(x = 1, callme = pi) { callme(x) }
-
 
118
mycaller()## wrongly gave `mm = NULL'  now = "Abc"