Installing SimSpin
Here, we explain how to install SimSpin on your machine, listing specific instructions for both MacOSX and Linux.
Table of contents
SimSpin is an open source R-package, registered with the Astrophysics Source Code Library, DOI: 1903.006. This package has been built and tested on OSX and Linux operating systems using R-CMD-check and coverage of tests has been measured using CodeCov. If you are familiar with R and astronomy software, you should be able to install simply from within R using the instructions in Installing SimSpin by clicking the button below. If you encounter problems, check for missing dependencies on your operating system using the instructions below.
Installing dependencies
You will need an installation of R to run this software. This can be downloaded from your local mirror for your operating system. We also suggest downloading the RStudio IDE for a friendly user environment. You can download these programs using the instructions at the buttons below.
Beyond base R itself, there are some dependencies that will be required that may not exist on your machine. SimSpin
requires the C libraries FFTW and HDF5. Instructions for downloading these libraries are provided below for Mac OSX and Linux machines.
Mac OSX
In order to install SimSpin
you will need a copy of XCode (11 or greater), which can be downloaded and installed from the Apple App Store for free.
Once complete, you will also need to ensure that the Command Line Tools have also been installed by running the following line from within a Terminal window. This is only necessary for Xcode versions prior to v13.1.
xcode-select --install
The FFTW and HDF5 packages can then be installed via the command line using Homebrew. Open a Terminal window and use the following commands:
brew install fftw
brew install hdf5
Linux
To install the FFTW and HDF5 packages on a Linux machine, open a Terminal window and use the commands:
sudo apt-get update
sudo apt-get libhdf5-dev
sudo apt-get libfftw3-dev
Installing SimSpin
Assuming that you have successfully installed a copy of R on your machine, the most recent release of SimSpin
can be installed from GitHub from within your R session using the following commands:
install.packages("devtools")
library("devtools")
install_github("kateharborne/SimSpin")
Required R-package dependencies will be installed at this time. If you encounter any errors, please check that all dependency libraries are successfully installed according to your operating system using the instructions above. If all else fails, report it as an issue on GitHub.
Once this installation is complete, load the package into your R session by typing:
library("SimSpin")
Following this, the functionality and documentation of the package should all be available within your R session. To check the installation has been successful, try typing:
?SimSpin
to see the cover page of the SimSpin
package documentation.