Displaying 1 result from an estimated 1 matches for "numpoly".
Did you mean:
nonpoly
2008 Jul 08
2
attributing values to dataframe positions following eval
...ng around, but can't seem to find the answer.
I get a list of names (which vary, so I never know them in advance), and
transform them into variables, each of which is a dataframe, using
assign:
polyList <- c("rs123", "rs124", "rs555", "rs000")
numPoly <- length(polyList)
for (k in 1:numPoly) {
assign(polyList[k], data.frame(matrix(NA, ncol=3, nrow=3)))
}
polyList <- lapply(polyList, as.name)
I can see the resulting dataframe associated to rs123 (for example)
using:
> eval(polyList[[1]])
X1 X2 X3
1 NA NA NA
2 NA...