[Rd] formulas and frames

Charles Geyer charlie at stat.umn.edu
Sat Apr 2 22:35:20 CEST 2005


On Fri, Apr 01, 2005 at 05:04:23PM +0200, Dimitris Rizopoulos wrote:
> if I understand well you want something like this:
> 
> y <- rnorm(100)
> p <- rnorm(100)
> x1 <- rnorm(100)
> x2 <- rnorm(100)
> x3 <- rnorm(100)
> nams <- c("y", "p", paste("x", 1:3, sep=""))
> ##############
> dat <- as.data.frame(lapply(nams, get))
> names(dat) <- nams
> dat
> 
> I hope it helps.

Yes, that's it.  Thanks.
(So ignore previous message).
-- 
Charles Geyer
Professor, School of Statistics
University of Minnesota
charlie at stat.umn.edu



More information about the R-devel mailing list