Re: [R] Passing a Data Frame Name as a Variable in a Function

2015-01-29 Thread Alan Yong
Much thanks, Hadley! Cheers, Alan On Jan 29, 2015, at 12:36 PM, Hadley Wickham wrote: > On Thu, Jan 29, 2015 at 11:43 AM, Alan Yong wrote: >> Much thanks to everyone for their recommendations! I agree that fishing in >> the global environment isn't ideal & only shows

Re: [R] Passing a Data Frame Name as a Variable in a Function

2015-01-29 Thread Alan Yong
Much thanks to everyone for their recommendations! I agree that fishing in the global environment isn't ideal & only shows my budding understanding of R. For now, I will adapt Chel Hee's "length(eval(parse(text=DFName))[,1])" solution then fully explore Jeff's suggestion to put the data frames

[R] Passing a Data Frame Name as a Variable in a Function

2015-01-28 Thread Alan Yong
Dear R-help, I have df.1001 as a data frame with rows & columns of values. I also have other data frames named similarly, i.e., df.*. I used DFName from: DFName <- ls(pattern = glob2rx("df.*"))[1] & would like to pass on DFName to another function, like: length(DFName[, 1]) however, when I ru