[R] error message stops "for" command

Joris Meys jorismeys at gmail.com
Wed Jun 16 17:43:11 CEST 2010


for (i in 1:100){
  if (i%%5==0) {print("And provide reproducible code.");next}
  print("Before posting to the mailing list, I will read the posting guide.")
}

Cheers
Joris

On Wed, Jun 16, 2010 at 5:37 PM, diana buitrago <dianacamila at gmail.com> wrote:
> Hello all,
> I am using a for statement to run a loop in R but I get an error message and
> the loop stops. I need that the loop continues til the end. I know I can use
> the NEXT command but I don´t know how the sintax woul be for this particular
> situation.
>
> Any suggestions?
Reading the posting guide?
>
> Thanks,
>
> Diana Buitrago
>
>        [[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.
>
>



-- 
Joris Meys
Statistical consultant

Ghent University
Faculty of Bioscience Engineering
Department of Applied mathematics, biometrics and process control

tel : +32 9 264 59 87
Joris.Meys at Ugent.be
-------------------------------
Disclaimer : http://helpdesk.ugent.be/e-maildisclaimer.php



More information about the R-help mailing list