Interacting with R & RStudio
If you aren't familiar with using R and RStudio, check out our quick tutorial.
Install Spectre from Github
Check Spectre version
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.
After installing devtools, we recommend restarting RStudio, otherwise you may see an error like the following:
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://github.com/ImmuneDynamics/Spectre/releases). To install a specific release version, see https://cran.r-project.org/web/packages/githubinstall/vignettes/githubinstall.html.
If you are trying to install the 'development' version of Spectre, use:
devtools::install_github("immunedynamics/spectre", ref = 'development')
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.
Possible queries during installation
R will inform you of which additional package are being installed.
As each dependency (package) is being installed, you will see updates.
If you see the following prompt, click 'Install'.
You may be asked for permission to compile the code for certain pages, type 'Yes' and run the code.
If the installation was successful, you should see something similar to the following:
You can check on the status of Spectre and the other package dependencies by running 'package.check()'.
You should see something like the following returned, but with the most recent version of Spectre.
Load libraries (packages)
You can then load the required packages using the 'package.load()' function.
If Spectre or any of the dependencies was not installed successfully, you may see some error messages like the following.
Alternatively, if Spectre was successfully installed, but when running 'package.check()' some of the dependencies were not been installed correctly, you will see something like the following: