Displaying 1 result from an estimated 1 matches for "sintest2".
Did you mean:
sintest
1997 May 09
2
R-alpha: R-0.49 / S-plus: "default argument evaluation" bugs and woes
...ent reference
## S-plus 3.4 (being 100% ok):
S> sintest(1)
x y sin
1 2 0.7071068
Warning messages:
looking for function "sin", ignored local non-function in: sintest(1)
-------------------------------------------------------
The following shows bugs, both in R and S:
sintest2 <- function(x ,y = 2)
{
## Purpose: Test of "default argument evaluation"
## -------- Fails for S-plus 3.4. Martin Maechler, Date: 9 May 97.
c(x=x, y=y, sin=sin)
}
R> sintest2(1)
[[1]]
[1] 1
[[2]]
[1] 2
[[3]]
<primitive: sin>
--------------- is almost okay,
t...