Re: [R] different way for a for loop for several columns?

2012-02-14 Thread ilai
lations are done for the different rows…" So, no! calculations are done on the object (which has some dimension or is a list), only in rare cases do you need to loop over each element (or dimension) of the object itself. > > Many thanks, I’m trying to learn as much as possible to be able t

Re: [R] different way for a for loop for several columns?

2012-02-13 Thread Rui Barradas
Hello, > > I use a for loop to take into account the years. > Then, I want to do this as well for the other objects and I use again > another loop around it. > The script works well, but it takes a lot of time. > Look at the first line in the inner loop: > for (l in 1:3) > { > for (y

[R] different way for a for loop for several columns?

2012-02-13 Thread Nerak
Hi, I have a question about repeating something for several columns. I calculated a lot of values for different objects. The values are normally calculated step-wise for every day for each object. With this obtained data frame, I make further calculations. Here I have to calculate some things and