2 ms·
Often what is slow in an R program is not the core analysis function you want to call, but everything you have to do before and after you call that function, IE
by dagw 11y ago
Often what is slow in an R program is not the core analysis function you want to call, but everything you have to do before and after you call that function, IE turning your raw data into a data structure containing the relevant data to feed into the function and taking the output of the function and munging it into whatever output format you actually need. This should help speed up those bits quite a lot.
- jbssm 11y agoI see, thanks. I my own code I suspect that it's the for loops I can't vectorise that are making R taking so long in some operations, so this is where this project would help. Must give it a try then.
- Lofkin 11y agoYou can use python, call out to R libraries with Rpy2 and speed up loops to faster than Julia and around native Speed with numba
- Mikeb85 11y agoIn R its very easy to simply create a function in C++ or Fortran, then call that. Plus there's plenty of functions already that you can call instead of using for loops in R (which really aren't idiomatic).