Session 2

We will introduce ProcData package in session 2. You are encouraged to install ProcData and dependent packages and libraries before the workshop. This section provides instructions on the installation of ProcData. If you need help during the installation process, please post your issue on our GitHub page. We will respond as soon as possible.

ProcData can be installed through the following three steps.

Step 1 Preparation

ProcData depends on R packages Rcpp for incorporating C++ code in R code and keras for training neural networks. If you would like to install ProcData from source, then compiler tools are needed. ProcData calls Python library Keras for building and training neural networks in Python. Some functions in ProcData require Python to work. Note that the following two steps do not have to be performed before installing ProcData. You will be prompted if R detects a missing component.

  • Install compiler tools.
    • For Windows users, Rtools provides tools for building R packages from source. One can download Rtools and find its installation guide here.
    • For Mac users, Xcode provides tools necessary for compiling ProcData. Xcode can be obtained from Apple AppStore and the Xcode developer page. An Apple developer account is needed. More information about compiling R packages for macOS can be found at here.
  • Install Python. We recommend using Anaconda for creating and managing Python environments. An installer can be found on its official website.

Step 2 Install ProcData and dependent R packages.

ProcData is available on CRAN. The package and its dependent packages can be installed by executing the following command in R.

install.packages("ProcData", dependencies=T)

The development version of ProcData can be installed from Github in R by the following command.

devtools::install_github("xytangtang/ProcData", dependencies=T)

Step 3 Install dependent Python libraries.

To finish installing R package keras, run the following commands in R.

library(keras)
install_keras()

Note:

  • This step installs Python libraries Keras and Tensorflow. You will be asked if you would like to install Miniconda if R could not find an appropriate Python environment. Miniconda is a light-weight version of Anaconda. We recommend selecting yes to let R installs Miniconda if you have little experience with Anaconda or Python.
  • You can test whether keras is installed properly by running
mnist <- dataset_mnist()

More detailed information on installing keras can be found on keras website.

Session 3

R packages

Section 3 of the workshop covers several applications of process features to practical testing problems. We will go over these applications in an interactive R tutorial. Running the tutorial locally requires the learnr R package. It can be installed with the following R command.

install.packages("learnr", dependencies = T)

Assuming that the ProcData package and its dependencies have been successfully installed, Section 3 additionally requires the following R packages:

  1. glmnet: To install this package and its dependencies, run:

        install.packages("glmnet", dependencies = T)
  2. mirt: To install this package and its dependencies, run:

        install.packages("mirt", dependencies = T)
  3. doSNOW: To install this package and its dependencies, run:

        install.packages('doSNOW', dependencies = T)

You can check that a package is successfully installed by running library(<packagename>), for example, library(glmnet). You may see warnings, but not errors messages.

Rtools for Windows

For Windows users, please ensure that Rtools has been added to the system path. This can be checked by retarting R and running the following command:

    Sys.which("make")

The above command should return the directory that contains make.exe, for example, "C:\\rtools40\\usr\\bin\\make.exe". If this is what you get, you are all set. Otherwise, please make sure you have followed the Rtools installation guidelines at https://cran.r-project.org/bin/windows/Rtools/ and restart R before checking again.

Test Run of Source Functions

Please try to source the src_partial_dif.R R script. If there are no error messages, you are set for Session 3. If you encounter the undefined reference to dgemm error message, chances are gfortran is missing from the system, or you are using an old version that conflicts with the latest R version. In this case, try the following: