[R] Help -- feed data frames, returned from function into list --
Sunny Singha
sunnysingha.analytics at gmail.com
Thu Mar 10 08:56:44 CET 2016
Hi,
I got a problem. Using loop, I'm trying to feed data frames, returned from
the function, into the list but not all data frames are getting captured.
I have vector with some string values which I want to pass to the function.
*groups* <- c('cocacola', 'youtube','facebook)
for(i in 1:length(groups)){
g <- list()
g[[i]] <- searchGroups_mod(*groups[i]*, token=fb_oauth, 10)
}
The result list stores data frame only for the last string in the 'groups'
vector.
Why the List is getting reassigned for each iteration ? Please guide.
Regards,
Sunny Singha.
[[alternative HTML version deleted]]
More information about the R-help
mailing list