An R Introduction to Statistics

Installing GPU Packages

After installing the CUDA Toolkit and R, you can download and extract the latest rpux package in a local folder, and proceed to install rpudplus on your operating system.


For Windows users, in the R main console, you can select the menu item “Packages > Install package(s) from local zip files”. Then navigate to the extraction folder you have just created, and install the two binary packages and in turn. The package is for your reference only. It is not meant to be installed.

Mac OS X

For Mac users, you should open an OS X terminal and change current directory to the extraction folder.

$ tar xf rpux_0.6.1_mac.tgz 
$ cd rpux_0.6.1_mac

And you can install the binary packages.

$ R CMD INSTALL rpud_0.6.1.tgz 
$ R CMD INSTALL rpudplus_0.6.1.tgz

You can optionally install the rpud source package in a terminal if you already have the Xcode command line tools installed.

$ R CMD INSTALL rpud_0.6.1_src.tgz


The R installation process is a little bit different on Linux. For Fedora users, enter the following in a terminal.

$ sudo yum install R-devel

For Ubuntu users, use the following instead.

$ sudo apt-get install r-base-dev

Ubuntu users should also follow the CRAN instruction for the latest R release.

Then you can open an R console and change working directory to the extraction folder.

> setwd("<extraction folder>/rpux_0.6.1_linux")

And you can install the binary packages in turn.

> install.packages("rpud_0.6.1.tar.gz") 
> install.packages("rpudplus_0.6.1.tar.gz")

You can optionally install the rpud source package in R.

> install.packages("rpud_0.6.1_src.tar.gz")

Package Dependency

If you need SVM and Bayesian inferences, you should meet their dependencies on coda and SparseM in R.

> install.packages(c("coda", "SparseM"))

For deep learning, you would need ggplot2.

> install.packages(ggplot2)

Now you may verify your rpudplus installation.

> library(rpud) 
Rpudplus 0.6.1 
Copyright (C) 2010-2016 Chi Yau. All Rights Reserved. 
This copy of RPUDPLUS is NOT yet activated. 
Not all functions are available.


You will need an official license to use rpudplus. To apply an individual user license, you should identify your home folder in an R console by typing the following command, and copy the license file to your home folder location.

> Sys.getenv("HOME")

For Windows users, the home folder for R is usually the Document folder: “C:\Users\<username>\Documents”. For Mac OS X users, it is usually “/Users/<username>”. As for Linux users, it is usually “/home/<username>”.

To apply the license in a cluster environment, you should copy the license file to the installation folder of rpudplus instead: “<libpath>/rpudplus/rpudplus.LICENSE”. The individual user license will override the cluster system license if both are present.


The rpudplus GPU package requires double precision arithmetic hardware support. In order to fully exploit its capabilities, you should ensure the compute capability of your CUDA GPU exceeds 2.0 or above according to the CUDA hardware page.

Furthermore, the Windows version of rpudplus prefers a Tesla GPU running in TCC mode. Since the GeForce hardware does not support TCC mode, the performance is suboptimal.

For Linux and Mac OS X servers, you may need video hardware access privilege. Joining the video group would be essential.