Wednesday 29 July 2015

A Tutorial on Loops in R – Usage and Alternatives via @DataCamp

Great tutorial on using loops in R from DataCamp's blog.

I love the examples.  All I would say is that you need to be careful when using loops and be sure it is the right kind of loop for what you want to do.  Also check that it really does what you think it will do.  Do a dry run of the loop and it's behaviour using either a piece of paper or a computerised method of making notes just to be sure you know how the loop and the commands around and within it will behave.  5 minutes checking now could save a lot longer later on.  Have fun!

No comments:

Post a Comment

Note: only a member of this blog may post a comment.