Skip to content
Prev 169898 / 398506 Next

Odp: Problem with retrieving updated variables after attach()

Well, I knew that attach() only creates a copy of the variables in the 
search path.

What I wanted to ask was how to *retrieve* that copy...

 > mat
 id age
1 NA  NA
2 NA  NA
3 NA  NA
4 NA  NA
5 NA  NA  

 > attach(mat)

 > id <<- sample(100,5)
 > age <<- rnorm(5,mean=30)

How can I make a new data frame out of the id and age that were changed 
above?