search for: list_in_listnames

Displaying 1 result from an estimated 1 matches for "list_in_listnames".

2010 May 20
1
use object within rda file in for loop
...saved within each *.rda file (only one list per rda file). Here is my code: fpath <- "D:/R" listnames <- list.files(path=fpath, pattern=glob2rx("*.rda"), full.names=FALSE) for (i in 1:length(listnames)) { load(paste(fpath, listnames[i], sep="/")) z <- list_in_listnames[i] ## here is my problem **do something on z** } It might be really simple, but listnames is a character vector and I cannot find how to store the values within each element into z. I think there would be a function to get and use an object with a given pattern in its name. The pattern itsel...