Re: [R] Using a FOR LOOP to name objects

2012-02-29 Thread michaelyb
Michael - thank you so much! Just what I needed! -- View this message in context: http://r.789695.n4.nabble.com/Using-a-FOR-LOOP-to-name-objects-tp4430454p4433903.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org ma

Re: [R] Using a FOR LOOP to name objects

2012-02-29 Thread R. Michael Weylandt
In short, don't -- use a named list instead. Long answer: ?assign ?get Michael On Tue, Feb 28, 2012 at 10:40 PM, michaelyb wrote: > Hello, > > I am trying to use a for loop to name objects in each iteraction. As in the > following example (which doesn't work quite well) > > my_list<-c("A","B",

[R] Using a FOR LOOP to name objects

2012-02-28 Thread michaelyb
Hello, I am trying to use a for loop to name objects in each iteraction. As in the following example (which doesn't work quite well) my_list<-c("A","B","C","D","E","F") for(i in c(1:length(my_list))){ url<- "http://finance.yahoo.com"; doc = htmlTreeParse(url, useInternalNodes = T) tab_nodes