ARTEMIS Installation Guide


The easiest way to install artemis is from one of the pre-compiled binaries on the artemis releases page. Install package dependencies (first line below), then run the line below that applies to your particular platform.

# install dependencies
install.packages(c("StanHeaders", "Rcpp", "rstan", "rstantools", "ggplot2", "lme4"))

##-- MacOSX --##
install.packages("https://github.com/fishsciences/artemis/releases/download/v0.14.0/MacOS-artemis_0.14.0.tar.gz",
                 repos = NULL)

##-- LINUX --##
install.packages("https://github.com/fishsciences/artemis/releases/download/v0.14.0/artemis_0.14.0_R_x86_64-pc-linux-gnu.tar.gz", 
                 repos = NULL)

##-- Windows --#
install.packages("https://github.com/fishsciences/artemis/releases/download/v0.14.0/artemis_0.14.0.zip", 
                 repos = NULL)


Testing your installation

If your installation of artemis and its dependencies was successful, the following code should run without error (although you may see warning messages from rstan about Bulk/Tail Effective Samples Sizes being too low). If the first or second model returns an error that seems to have something to do with your c++ compiler, you may need to follow instructions to edit your Makevars or Makevars.win file.

library(artemis)

model_fit = eDNA_lm(Cq ~ Distance + Volume + Distance*Volume, 
                    data = eDNA_data,
                    std_curve_alpha = 21.2, std_curve_beta = -1.5,
                    iter = 300, n_chain = 2)

model_fit2 = eDNA_lmer(Cq ~ Distance + Volume + (1|SampleID),
                       eDNA_data,
                       std_curve_alpha = 21.2, std_curve_beta = -1.5)

Installing artemis from source

Installing artemis from source on Windows is not currently well-supported; we recommend installing from the pre-compiled binary if you’re on Windows. If you’re on MacOS or Linux and you prefer to install from source, then go ahead and do that with your function/utility of choice (devtools::install_github(), utils::install.packages(type = "source"), R CMD INSTALL, etc.).

If you have sub-architecture you’re really in to customizing, the source code is here, go nuts.