The R Project SVN R

Rev

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

Rev 72407 Rev 72409
Line 140... Line 140...
140
  Chapter 3 of \emph{Statistical Models in S}
140
  Chapter 3 of \emph{Statistical Models in S}
141
  eds J. M. Chambers and T. J. Hastie, Wadsworth & Brooks/Cole.
141
  eds J. M. Chambers and T. J. Hastie, Wadsworth & Brooks/Cole.
142
}
142
}
143
\examples{
143
\examples{
144
data.class(model.frame(dist ~ speed, data = cars))
144
data.class(model.frame(dist ~ speed, data = cars))
-
 
145
 
-
 
146
## get_all_vars(): new var.s are recycled (iff length matches: 50 = 2*25)
-
 
147
ncars <- get_all_vars(sqrt(dist) ~ I(speed/2), data = cars, newVar = 2:3)
-
 
148
stopifnot(is.data.frame(ncars),
-
 
149
          identical(cars, ncars[,names(cars)]),
-
 
150
          ncol(ncars) == ncol(cars) + 1)
145
}
151
}
146
\keyword{models}
152
\keyword{models}