[R] using a for loop with variable as vectors

2009-02-27 Thread Laura Lucia Prieto Godino
Dear R users, I am completelly lost with the following: I have the following vectors a, b ,c, d and e + a [1] 279.3413 268.0450 266.3062 433.8438 305.4650 317.4712 288.3413 374.6950 b [1] 170.4500 254.5675 219.5762 232.3425 200.2738 238.2637 210.6062 262.4825 345.2387 269.3763 [11]

Re: [R] using a for loop with variable as vectors

2009-02-27 Thread baptiste auguie
Hi, you could do one of the following, 1) combine a, b, c, d, e in a list and use ?lapply my.list - list(a,b,c,d,e) lapply(my.list, foo) where foo() is a function to be applied to each individual element 2) alternatively, see ?get to retrieve the value of a variable from its name. Your