Can someone point me to a good tutorial for using vectorized programming methods in R.
At the moment it feels very magical to me and I don’t really understand what R’s doing.
Especially with regards to if statements and addressing values neighboring rows.
Can someone point me to a good tutorial for using vectorized programming methods in
Share
I am not aware of a specific tutorial on vectorized programming for R.
I have a few versions of my Intro to High-Performance Computing with R tutorial here. The benefit of vectorized code is mentioned in the context of profiling, but it doesn’t explain ‘how to vectorize code’. I think that is hard to teach — my best bet would be to read other people’s code. Pick a few packages from CRAN and poke around.
Other than that, decent general purpose documents about R and programming in R are e.g. Pat Burns S Poetry and the more recent R Inferno.