You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Install Spectre from Github

Installing new, or updating?

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.



Install Devtools

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.

## Install (if not already installed)
if(!require('devtools')) {install.packages('devtools')}


Install Spectre

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 To install a specific release version, see

## Install Spectre



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.

These packages have more recent versions available.
Which would you like to update?

1: All                               
2: CRAN packages only                
3: None                              
4: rlang    (0.4.1  -> 0.4.2 ) [CRAN]
5: digest   (0.6.22 -> 0.6.23) [CRAN]
6: roxygen2 (7.0.0  -> 7.0.1 ) [CRAN]

Enter one or more numbers, or an empty line to skip updates:
# Type '1' and press enter to update all packages, or '3' and press enter for no updates



Occasionally during installation, you may run into errors, such as the one below relating to 'flowCore'. Check out our installation troubleshooting page for help.

Error in library("flowCore") : there is no package called ‘flowCore’
Error: unable to load R code in package ‘Spectre’
Execution halted


Load libraries (to check installation).

Once the packages have been installed, you can load the libraries by running the following. Please ensure that each library successfully loads. If any do not load, or are listed as unavailable, please see the troubleshooting section below.

The Spectre package is designed to helps various computational tools work nicely with each other, in a single environment, design for high-dimensional cytometry/single-cell analysis. To do this, many of Spectre's functions are 'wrappers' for other packages (e.g. Spectre has functions to run FlowSOM and UMAP, but these functions use the code from the FlowSOM and UMAP R packages respectively) – ensuring the input and output parameters work in a consistent fashion, and adding modifications to tailor these packages to cytometry analysis. Because of this, Spectre requires the installation of a number of other packages. By default, many of these will be installed automatically when you install Spectre. However, this can sometimes be a problem if a necessary package attempts to be installed, but for some reason it can't be. In these cases, the error messages informing you that the package was not installed are easily missed.


## Check if all required packages have been installed


If installation of each package was successful, then you can proceed to load the other key packages.

Output: if installation was successful

Nothing will be returned in R, or message relating to the loading of these packages will be returned.


If installation of any specific package was not successful, you will see something like the following. If this occurs, you will need to attempt to install the packages directly. If you need help, please feel free to submit an issue on the Spectre Github repository.

Output: if installation was unsuccessful

Error in library('plyr') : there is no package called ‘plyr’


You can then load the required packages using the 'package.load()' function.

## Load all required packages


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 submit an issue on the Spectre Github repository. Alternatively, you can install Spectre using one of our self-contained docker images.

  • No labels