R package Rmpi

To find a demo associated with the Rmpi package, we could issue the following two lines:

library(Rmpi) 
demo() 

After hitting Enter, we will see the following output:

For the first function, called cslavePI, we know that we should copy cslavePI.c in Rmpi library directory to your working directory and compile it as mpicc -o cslavePI cslavePI.c. To find the path of Rmpi, we issue the find.package() function (refer to the code and the result in the following code):

> find.package("Rmpi") 
[1] "C:/Users/yany/Documents/R/win-library/3.4/Rmpi" 

Note that different readers will get quite different paths. We can use demo(cslavePI) to ...

Get Hands-On Data Science with Anaconda now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.