Re: [R] looping over a string

2009-01-22 Thread Greg Snow
ps, -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 > -Original Message- > From: r_lo...@web.de [mailto:r_lo...@web.de] > Sent: Thursday, January 22, 2009 1:27 PM > To: Greg Snow; r-help@R-project.org > Subject

Re: [R] looping over a string

2009-01-22 Thread Thomas Schwander
Greg Snow schrieb: I don't see right off why the one works and the other doesn't, but this looks like one of those cases that would be better done using a list rather than global variables. Instead of assigning the variables in the global workspace, create a list and assign them there. Then

Re: [R] looping over a string

2009-01-22 Thread Greg Snow
I don't see right off why the one works and the other doesn't, but this looks like one of those cases that would be better done using a list rather than global variables. Instead of assigning the variables in the global workspace, create a list and assign them there. Then you can use lapply in