UPDATE: IsoriX 0.9.3 is on CRAN

14 views
Skip to first unread message

Alexandre Courtiol

unread,
Sep 9, 2024, 1:21:45 AM9/9/24
to IsoriX

Dear friends of IsoriX, a new version of IsoriX is ready!


Compared to the big changes introduced in 0.9.1-0.9.2 to make IsoriX rely on the R spatial package `terra` instead of `raster` and `sp`, this new update is relatively trivial.


I have added some safety checks on user input data, added a global option to fine tune the title of all isoscape plots, and fixed various little glitches here and there (e.g. `getprecip()` was broken since the data provider for precipitation data had once again changed URL).


David Soto also asked me to adjust the isotopic values in the datasets about bats to make old isotopic data produced by the isotope lab of the Leibniz-IZW comparable to those produced by other labs out there. It follows his and others' efforts to help every lab produce comparable isotopic measurements. Those revised dataset have the same names as before but their names have the suffix Rev (for revised).


For more details on what has changed, so the NEWS file here.


I also revised the bookdown – the online documentation for IsoriX – with various minor improvements (thanks to François Rousset for spotting a few typos and thanks to Leonie Walter who is currently proofreading everything and find out many more typos). I also made 2 more substantial changes in that bookdown. First, building on the new terra format used by IsoriX, it is now very easy to plot isoscapes with ggplot2. I have therefore added a section showing how to here. Second, I have revised the section on precipitation weighting. The matter is complex, but after some discussion with David Soto and François Rousset, I have decided to revise the recommended approach and now propose something more simple and more traditional than before. See here for details.


That's all; but for those interested, I now detail a little more these last two topics (ggplot2 and precipitation weighting) since they bear on possible future developments for IsoriX.


Best, Alex



More thoughts about ggplot2:


It turns out that using ggplot2 to visualise isoscapes is so simple, and so powerful, that I foresee many users to stop using altogether the functions I have (painfully) written for creating plots out of the box (using lattice and not ggplot2). One question that regularly comes back, from the back of my mind, is whether or not I should propose functions that internally rely on ggplot2 – that is, functions that would create ggplot2 plots out of the box. I am sure some people would appreciate that and it would not be that difficult for me to code. Yet, my issues are that ggplot2 (which I know quite well despite not using it in IsoriX) is not very stable when it comes to backward incompatibility. For example, the update to ggplot2 3.5 that happened 7 months ago has created some issues within packages relying on ggplot2 (such as cowplot) which have yet to be solved. Furthermore, ggplot2 would imply that IsoriX would rely indirectly on 21 additional packages. I value IsoriX being as stable as possible, which is why I always made sure that this package does not depend on any tidyverse related packages. I have another, much larger, project that does depend on many of the tidyverse suite of packages (including ggplot2), and I have come to regret this design decision at least once a month since I spend a huge amount of time having to fix things that broke due to backward incompatible updates these packages keep introducing. That said, ggplot2 is much more stable than other tidy packages… Another point against developing functions around ggplot2 is that it is so simple to write ggplot2 code, and the web is full of tutorials about how to do so, that I think most people should not need any function. Anyhow, if you have strong feelings about all of that, please let me know. I am biassed since I have a long-standing love-hate relationship with products offered by Posit (formerly known as RStudio) which started even before RStudio existed (but this is another story).



More thoughts about precipitation weighting: 


The new simple recommended approach for precipitation weighting means that for now, the functions `isomultifit()` and `isomultiscape()` have lost their raison d'etre. It is unclear if anyone ever used them, but I think I will tinker a little with them to make them useful for other purposes (e.g. for creating many yearly isoscapes at once). Call that code recycling if you will. I will also discuss with the isotope community the new precipitation-weighting approach further. If we agree on what is best, I may then hardcode the approach in IsoriX so that it becomes super easy for users to compute precipitation-weighted isoscapes. At the heart of the discussion is what a precipitation-weighted isoscape should truly represent? That sounds a priori simple, but the true meaning is not that obvious. I do not see those isoscapes as trying to emulate an isoscape reflecting the true watershed at a given moment in time. Instead, I came to see those isoscapes as born out of the necessity to compensate for an imperfect sampling. This muddy the waters since in this case, there is no clear natural situation we should try to get to. When details must be made explicit (e.g. what should the variation of this isoscape represent in nature?), which the internals of IsoriX require, things thus become quite quickly tricky. Again, if you have strong feelings about this question, please reach out privately (for my address, type `maintainer("IsoriX")`  in R) or publicly.


++

Reply all
Reply to author
Forward
0 new messages