In R its very easy to simply create a function in C++ or Fortran, then call that.  Plus there&#x27;s plenty of functions already that you can call instead of using for loops in R (which really aren&#x27;t idiomatic).