Install Spectre from Github
To see if you have Spectre installed, you can open RStudio and look under the 'packages' tab. The version will be listed in the right hand column. Hit the button to refresh the package list if you need. If you have the latest version installed, R won't install it again. If you have an older version, the R will install the latest version. If you wish, you can check the Spectre Home Page for the latest version.
If you are updating Spectre, we advise deleting the previous installation to ensure a clean update.
In R, install and load the 'devtools' package. The devtools package has a number of dependencies (packages that it needs to use) that it will automatically install when you install 'devtools' – this might take some time.
Subsequently, use the 'install_github' function to install and load the Spectre package. By default this will load the 'master' branch, which is the same as the latest stable release version (listed at https://immunedynamics.github.io/spectre). To install a specific release version, see https://cran.r-project.org/web/packages/githubinstall/vignettes/githubinstall.html.
If you are updating Spectre (rather than installing for the first time), we recommend re-starting RStudio at this point.
Confirm or decline updates
During installation, you may see a message like the following. You can update all the packages if you wish, but if you are unsure, or using multiple packages in other contexts, it might be wise to wait until you have time to update everything and test your scripts afterwards.
Occasionally during installation, you may run into errors, such as the one below relating to 'flowCore'. Check out our installation troubleshooting page for help.
Check libraries (packages)
Once the packages have been installed, you can load the libraries (packages) by running the following. Please ensure that each library successfully loads. If any do not load, or are listed as unavailable, please see our installation troubleshooting page for help.
If installation was successful you will see messages like the following (or no messages if packages are currently loaded)
Loading required package: caret
Loading required package: lattice
Loading required package: class
If installation was unsuccessful you will see messages like the following
Error in library('plyr') : there is no package called ‘plyr’
If installation of each package was successful, then you can proceed to load the other key packages. If installation of any specific package was not successful, see our installation troubleshooting page for help.
Load libraries (packages)
You can then load the required packages using the 'package.load()' function.
Package installations can fail due to a number of reasons, including R version incompatibilities (for example, Spectre v0.1 will not work in R v3.3.0), or package incompatibilities. If you are having problems installing Spectre, please see our installation troubleshooting page or submit an issue on the Spectre Github repository. Alternatively, you can install Spectre using one of our self-contained docker images.