[R] Loop

Rui Barradas ruipbarradas at sapo.pt
Mon Feb 18 00:32:55 CET 2013


Hello,

As for the first question, you can do something like


Timeframemin<-10
Timefram<-10000

uFrame <- seq(Timeframemin, Timefram, by = 10)

for(u in uFrame) {}


As for the second question, the answer is yes, there is a print() 
function, which can be used for your purpose.


Hope this helps,

Rui Barradas
Em 17-02-2013 18:53, Trying To learn again escreveu:
> Hi all,
>
> I want to execute a loop of a program:
>
> for (u in Timeframemin:Timeframe){}
>
> Imagine that Timeframemin<-10
> Timefram<-10000
>
> Is it posible to execute the loop but only proving from 10 to 10000 but
> jumping 10 each time, for example, execute for 10,20,30.....to Timeframe.
>
> Other question is, when a program is "heavy" and has a lot of loops to
> execute (how can I know where loop is executing at the moment? There is
> some "print" or something to see in wich step of the loop is the program to
> see if the program is advancing?
>
> Many thanks in advance.
>
> 	[[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



More information about the R-help mailing list