Re:A newcomer’s (angry) guide to R
by crispyambulance on Wednesday June 13, 2018 @08:59PM
(#17308406)
Really, it's not always worth the trouble.
Sometimes a loop is vastly more performant if you count the amount of time it takes to get the "idiomatic" way working and working in a way that allows easy troubleshooting.
Unless you do something quitec complex dplyr is faster for such operations and consumes less RAM too.
https://github.com/jennybc/row-oriented-workflows
getting comfortable with purrr has been enormously helpful in consolidating my code and avoiding unnecessary loops
I always feel bad when I resort to a for loop in R. Do you have any recommended ressources about mastering those specific manipulations?