An R package for Post Vortex Simulation Analysis.
Using this package, data of population viability analysis (PVA) generated with the software Vortex (Lacy & Pollak 2013) can be collated, plotted and analysed using basic (e.g. pairwise comparisons of scenarios) or more advanced statistics (e.g. fitting regression models).
The stable version of
vortexR can be installed with:
install.packages("vortexR", dependencies = TRUE)
The latest development versions of
vortexR and its supplementary data package
vortexRdata can be installed with:
# install.packages("devtools") devtools::install_github("carlopacioni/vortexRdata") devtools::install_github("carlopacioni/vortexR")
Fresh Windows installations of R will require Rtools for Windows.
If installation with
build_vignette=TRUE fails, you can run
rJava require a Java Development Kit (JDK) installed and registered correctly with R. Make sure to install a 64-bit JDK if you are using a 64-bit version of R.
A typical installation path for Java-based packages like
glmulti in a GNU/Linux-based operating system (here: Ubuntu 16.04 LTS) along the lines of DigitalOcean’s tutorial:
sudo apt-get install openjdk-8-jdkand verify with
sudo update-alternatives --config java
sudo update-alternatives --config javac
JAVA_HOMEto your preferred Java installation: (here we use /usr/lib/jvm/java-8-openjdk-amd64/jre) by appending the line
sudo echo "JAVA_PATH=\"/usr/lib/jvm/java-8-openjdk-amd64/jre\"" >> /etc/environment
source /etc/environmentto instantly export the new environment variable
echo $JAVA_HOMEprints the
sudo R CMD javareconf
Independently of vortexR, a
sudo R CMD javareconf (and possibly the installation of
rJava and Java-using packages like
glmulti) will be required after each update of R and / or your Java installation.
A typical installation under Windows could follow:
JAVA_HOME(Windows 10 tutorial, Windows 7 tutorial), verify on Command Prompt (Win + r, “cmd”, Enter):
Control Panel ---> System --> Advanced Settings ---> Environment Variables. Your path should include the directories:
C:\Program Files\Java\jre6\bin\serverand the R installation directory, e.g.
RHOMEare BOTH set and point to the R installation directory, e.g.
If you have still problem installing and loading
glmulti package and/or
rJava, you may not have Java installed or are not using the same Java version as R. Make sure that if you are using a 64-bit version of R, you also have installed a 64 bit version of Java (most automatic installation via web browser will install a 32-bit version).
Your mileage may vary depending on your operating system and your versions of Java and R. Stack Overflow’s R community is a great source for troubleshooting.
??vortexR to see a broad description of the package. Use
help(package = "vortexR") to see the documentations available. Read the vignette for a more comprehensive description of the package. Be aware, if you did not use
build_vignette=TRUE this documentation may not be available from within R. In these cases, download the PDF of these documents. On some platforms,
??vortexR may not work even if you used
If you use
vortexR, please use the citation generated from
We are happy to receive feedback and contributions through bug reports and pull requests.
We aim to follow the style suggestions by
formatR::tidy_dir("R", width.cutoff = 79),
devtools::check(check_version = T, force_suggests = T, cran = T).
In a new environment, e.g. after an upgrade of R, running the tests could require to install vortexR’s dependencies with
install.packages("vortexR", dependencies = T).
Note on R 3.4.0: update lintr to solve bug roxygen #627.