1  Installing spant

spant is distributed as a software package for the R programming language. Complete the following steps to install spant on your system.

1.1 Step 1 - install R

R software and installation files for Windows, macOS and Linux are made available by a generous team of contributors.

Installation instructions and files for R are available from : https://cloud.r-project.org/

1.2 Step 2 - install RStudio

RStudio is not strictly necessary to use spant, but is strongly recommended if you are a beginner to R, or want to follow along with the examples in this book. Installation instructions and files for RSudio are available from : https://posit.co/download/rstudio-desktop/

1.3 Step 3 - install spant

Once RStudio is installed and running you will be presented with something similar to the following window.

RStudio To install spant, locate the console panel (either the left or lower left panel by default) and enter the following command at the prompt:

install.packages("spant", dependencies = TRUE)

(as shown in the above image) and press return. Once this process has completed, spant is installed on your system and ready for use. If you ever want to update spant to the most recent version, simply repeat the above command.

1.4 Command line interface

In cases where writing R code or installing RStudio is not desirable, analysis may still be performed using a command line interface. The command line interface may be used in isolation, or alongside the R/RStudio method, and may be particularly suited for use on computing clusters. Assuming R is installed and available on the system path (see Step 1), spant may be installed at the command line as follows:

Rscript -e "install.packages('spant', dependencies = TRUE,
            repos = 'http://cran.rstudio.com')"

The command line interface may then be installed system-wide, defaulting to “/usr/local/bin”:

sudo Rscript -e "spant::install_cli()"

Note an alternative installation path may be specified by passing it to the install_cli function, which may be necessary if root permissions are not available to the user:

Rscript -e "spant::install_cli('/Users/me/myscripts')"

The software should now be available to run via the command line. Run the following to get a full listing of command line arguments :

spant_fit_svs --help

Note, it is advisable to re-run the install_cli() command each time spant is updated.