Skip to Content
R Programming By Example
book

R Programming By Example

by Omar Trejo Navarro
December 2017
Beginner to intermediate
470 pages
12h 29m
English
Packt Publishing
Content preview from R Programming By Example

Dependencies for the Rcpp package and the .Fortran() function

Chapter 9, Implementing an Efficient Simple Moving Average, shows how to delegate code to Fortran and C++ to increase speed. These languages have compilers of their own that must be used to compile the respective code so that it can be used by R. How to compile such code is shown in the chapter. What we will do here is show how to install the compilers.

The compiler for C++ code is called gcc and the one for Fortran is called gfortran. It's probable that you have both already available in your computer, since they are dependencies for R, but in case you don't, it's easy enough to install them.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Efficient R Programming

Efficient R Programming

Colin Gillespie, Robin Lovelace
R Programming

R Programming

Jared P. Lander

Publisher Resources

ISBN: 9781788292542Supplemental Content