[R] Multiple counters in a single for loop

Jeff Newmiller jdnewm|| @end|ng |rom dcn@d@v|@@c@@u@
Sat Aug 25 18:57:29 CEST 2018


look at the map2 function in the purrr package.

On August 24, 2018 6:44:19 AM PDT, Deepa <deepamahm.iisc using gmail.com> wrote:
>Hello,
>
>Is there an option to include multiple counters in a single for loop in
>R?
>
>For instance, in python there is
>
>for i,j in zip(x,range(0,len(x))):
>
>
>Any suggestions?
>
>	[[alternative HTML version deleted]]
>
>______________________________________________
>R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
>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.

-- 
Sent from my phone. Please excuse my brevity.




More information about the R-help mailing list