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.

Windows

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 rpud_0.7.2.zip and rpudplus_0.7.2.zip in turn. The rpud_0.7.2_src.zip package is for your reference only. It is not meant to be installed.

Linux

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.7.2_linux")

And you can install the binary packages in turn.

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

You can optionally install the rpud source package in R.

> install.packages("rpud_0.7.2_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.7.2 
http://www.r-tutor.com 
Copyright (C) 2010-2022 Chi Yau. All Rights Reserved. 
 
This copy of RPUDPLUS is NOT yet activated. 
Not all functions are available.

RPUDPLUS License

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 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.

Note

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 3.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 servers, you may need video hardware access privilege. Joining the video group would be essential.