The R Project SVN R

Rev

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

Rev 71928 Rev 72919
Line 99... Line 99...
99
 
99
 
100
 zm <- zapsmall(polym (    1:4, c(1, 4:6),  degree = 3)) # or just poly():
100
 zm <- zapsmall(polym (    1:4, c(1, 4:6),  degree = 3)) # or just poly():
101
(z1 <- zapsmall(poly(cbind(1:4, c(1, 4:6)), degree = 3)))
101
(z1 <- zapsmall(poly(cbind(1:4, c(1, 4:6)), degree = 3)))
102
## they are the same :
102
## they are the same :
103
stopifnot(all.equal(zm, z1, tol = 1e-15))
103
stopifnot(all.equal(zm, z1, tol = 1e-15))
-
 
104
 
-
 
105
## poly(<matrix>, df) --- used to fail till July 14 (vive la France!), 2017:
-
 
106
m2 <- cbind(1:4, c(1, 4:6))
-
 
107
pm2 <- zapsmall(poly(m2, 3)) # "unnamed degree = 3"
-
 
108
stopifnot(all.equal(pm2, zm, tol = 1e-15))
-
 
109
 
104
options(od)
110
options(od)
105
}
111
}
106
\keyword{math}
112
\keyword{math}