UPDATE: IsoriX 8.3.0 is on CRAN

9 views
Skip to first unread message

Alexandre Courtiol

unread,
Sep 13, 2022, 5:23:54 AM9/13/22
to IsoriX
Hi all,

Yesterday, I sent a new version of IsoriX on CRAN and they accepted it.

As of right now, the binary versions have already been compiled by CRAN for Windows and compilation for MacOS should soon follow; so everyone should very soon be able to update IsoriX via a simple call to update.packages() in their R console.

I have also updated the online documentation accordingly and took the opportunity to improve many section: https://bookdown.org/content/782/

I made a (small) mistake: I meant to call this new version 0.9.0 to reflect all the changes that have happened, but I forgot before to press the submission button... so 0.8.3 it is (and version 0.9.0 will be something else).

So, what are the changes in IsoriX?

Most changes are detailed in the NEWS file, but here is what I consider to be the most important ones:

## the function getelev() uses a different source of elevation/bathymetry data

Instead of downloading always the same single file from internet, getelev() now uses internally the package {elevatr} to download elevation data.That leads to many benefits for both you and me: you can download smaller files if you are interested in elevation over a small part of the world, you can download rasters that have a higher resolution than before if you need to, the raster also contains bathymetry information for folks working beneath the surface, and I no longer need to host a big file on a server and to keep it up to date. The drawback is that {elevatr} relies internally on many packages including many from the {tidyverse} package ecosystem, so to install IsoriX successfully you need to indirectly install more packages than before. Since those packages are well maintained, that should not cause any practical issues.

This is a priori the only change I made that could break your existing code: the raster downloaded from getelev() no longer have the same name on the hard drive, so you may need to adjust the file names. That should be easy and sticking to the old name would have been confusing and wrong since the old name included the source of the elevation raster which has now changed.

## the function prepraster() gains an argument to turn some elevation/bathymetry into zeros

This will help people working above the surface to remove the bathymetry data (depth of seas and oceans) from their elevation raster, and this will help people working below the surface too since they will be able to remove the elevation data. Doing this is a good idea since it leads to less extrapolation when building isoscapes.

## the function isosim() is gone, for now :-(

This is not a good news, but the function that allowed simulating isoscapes under known parameter values (something very useful for testing but probably seldom used) is no longer working and I had to remove it. This is because isosim() relied on the package {RandomFields} to simulate the data but this package is no longer on CRAN. So IsoriX cannot use it (the package no longer installs). The maintainer of {RandomFields} does not understand why a dude from CRAN had an issue with the package or with his maintainer and decided to kick {RandomFields} out from CRAN (technically the package is still there but archived and not easily usable, it is said to be "retired"). I also do not understand this decision since the package had no obvious issues, and it seems that other people from CRAN also do not understand that harsh decision. Waiting for a CRAN-level solution that may never come, the maintainer promises me to host the package on GitHub soonish which should make it possible for me to reactivate the function within IsoriX.

## the function calibfit() now allows for several alternative research designs to establish (or import) a the relationship between samples of known origin and the environment

Before, to fit a calibration model, IsoriX required raw measurements of the calibration samples and no measurements of the isotopic composition of the environment in which the calibration samples are collected (IsoriX was predicting such measurement from the fitted mean isoscape). IsoriX is now much less restricted and can also handle situations where you measured the isotopic composition of the environment too (as when you grow organisms in a lab under controlled condition). I also opened to a controversial door for you to use calibration data or fit you may find in the literature. People have asked me this repeatedly since the beginning, but I was against it and did not really know how to. I still think it is a bad idea (perhaps not in all of the cases) but discussing with F. Rousset we found solutions to the challenge (at least in some cases).

This revision of calibfit() is the biggest change in this version and probably the biggest change in the whole of IsoriX since its initial release. Before rushing to use this feature, do please read carefully the bookdown chapter on this topic (https://bookdown.org/content/782/calibration.html), as well as the more detailed help included in the package (?calibfit).

## the function isofind() can include a source of uncertainty so far neglected

In our published book chapter, we described why, when using the default calibration method, the assignment should in principle depend on a the covariance between the prediction error of the calibration fit given the predicted isotope value at the candidate location, and the prediction error of the isoscape at this location. Until now I had not coded this covariance in the package because it is complicated to compute, slow to run, and was not apriori a large term. This is now implemented thanks to F. Rousset who did the math and modified the package {spaMM} to make it possible for IsoriX to extract particular matrices from the model fits it requires to do the computation. To keep IsoriX as backward compatible as possible (i.e. so that old code still gives the same results), and because test shows that it is indeed slow to compute this term and does not change much assignment maps, the term is omitted by default but you can activate it using a specific argument in isofind(). I would recommend you to draft your workflow without it and to activate it for the very final analyses.

I hope everything will work as expected, if you have any issue or question, just let me know.

All the best,

Alex



Reply all
Reply to author
Forward
0 new messages