Hallo. Could you please tell me if it is possible in R use something like for-cycle or conditions with if and then. I would need to index z from 0 to m and repeat some operations on each of them. Could you please write me how can I do this? Thank you very much Barbora Kocurova
Barbora Koc??rov?? wrote:> Hallo. > Could you please tell me if it is possible in R use something > like for-cycle or conditions with if and then. > I would need to index z from 0 to m and repeat some operations on each of them. > Could you please write me how can I do this?What about reading the manual? Such simple operations are explained there in detail.> Thank you very much > Barbora Kocurova > > ______________________________________________ > R-help at stat.math.ethz.ch mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide! http://www.R-project.org/posting-guide.htmlYes, please do! Uwe Ligges
?Control but there are alternative ways : sapply(), apply(), lapply()... ifelse() etc. Barbora Koc??rov?? a ??crit :>Hallo. >Could you please tell me if it is possible in R use something >like for-cycle or conditions with if and then. >I would need to index z from 0 to m and repeat some operations on each of them. >Could you please write me how can I do this? >Thank you very much >Barbora Kocurova > >______________________________________________ >R-help at stat.math.ethz.ch mailing list >https://stat.ethz.ch/mailman/listinfo/r-help >PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html > > >