Skip to contents

The phylosem package depends on several upstream packages, which it uses in a way that depends heavily on their internal (binary) structure. Sometimes, therefore, installing an update to one of these packages will require that you re-install a binary-compatible version of phylosem, i.e. a version that has been compiled with the updated version of the upstream package.

  • If you have development tools (compilers etc.) installed, you should be able to re-install a binary-compatible version of the package by running install.packages("phylosem", type="source"). If you want to install the development version of phylosem instead, you can use remotes::install_github("James-Thorson-NOAA/phylosem"). (On Windows, you can install development tools following the instructions at https://cran.r-project.org/bin/windows/Rtools/; on MacOS, see https://mac.r-project.org/tools/.)

  • If you do not have development tools and can't/don't want to install them (and so can't install packages with compiled code from source), you can revert the upstream package(s) to their previous binary version. For example, using the checkpoint package:

    
    ## load (installing if necessary) the checkpoint package
    while (!require("checkpoint")) install.packages("checkpoint")
    ## retrieve build date of installed version of phylosem
    bd <- as.character(asDateBuilt(
          packageDescription("phylosem",fields="Built")))
    oldrepo <- getOption("repos")
    use_mran_snapshot(bd) ## was setSnapshot() pre-checkpoint v1.0.0
    install.packages("TMB")
    options(repos=oldrepo) ## restore original repo

    A similar recipe (substituting Matrix for TMB and TMB for phylosem) can be used if you get warnings about an incompatibility between TMB and Matrix.

Details

Copied from glmmTMB with permission