Hi Joris,
Thanks very much. I think the %in% ls() was the key. I just needed to know
how to select elements that existed in ls().
Scott
On Sat, Jun 5, 2010 at 4:22 PM, Joris Meys jorism...@gmail.com wrote:
Hi,
One possible way to get around it is using following idea :
X1 - rnorm(10)
X2
Hi,
One possible way to get around it is using following idea :
X1 - rnorm(10)
X2 - rnorm(10)
Names - c(X1,X2,X3)
Names - Names[Names %in% ls()]
n - length(Names)
p - 10 #length of each object
output - matrix(NA,ncol=n,nrow=p)
for(i in 1:n){
output[,i] - get(Names[i])
}
output -
Hello, I am trying to make a data frame from many elements after
running a function which creates many elements, some of which may not
end up being real elements due to errors or missing data. For example,
I have the following three elements p1s, p2s, and p3s. p9s did not
generate the same data as
3 matches
Mail list logo