slendr 0.7.1
- Starting from this release, the *spatial* simulation and data analysis functionality of slendr is conditional on the presence of R geospatial packages sf, stars, and rnaturalearth on the system. This means that users will be able to install slendr (and use all of its non-spatial functionality) even without having these R packages installed. That said, nothing really changes in practice: spatial features of slendr are just one
install.packages(c("sf", "stars", "rnaturalearth"))
away! The difference is that slendr doesn't try to do this during its own installation, but users are instructed to do this themselves (if needed) when the package is loaded. (#7a10ea)
If spatial dependencies are not present but a spatial slendr function is called regardless (such as world()
, move()
, etc.), an error message is printed with an information on how to install spatial dependencies via install.packages()
as above.
Why? It's true that the main reason for slendr's existence is its ability to simulate spatio-temporal data on realistic landscapes via SLiM. However, in practice, most of the "average" uses of slendr in the wild (and in classrooms!) rely on its traditional, non-spatial interface, with its spatial features being used comparatively rarely at the moment (except for some cutting-edge exploratory research). Given that setting up all of the spatial dependencies can be a bit of a hurdle, we have decided to make these dependencies optional, rather than force every user to go through the process of their installation whether they need the spatial features or not.
-
A function
check_dependencies()
is now exported and can be used to check whether a slendr Python environment () or SLiM () are present. This is useful for other software building upon slendr, normal users can freely ignore this. (#6ae6ce) -
A path to a file from which a tree sequence was loaded from is now tracked internally via a
attr(<tree sequence>, "path")
attribute. Note that this has been implemented for the purposes of clean up for large-scale simulation studies (such as those facilitated by demografr) as a mostly internal feature, and should be considered experimental. (#f181a2) -
Attempts to resize a population right at the time of the split (which led to issues with simulations) are now prevented. (#f181a2)
-
Fix for a minor issue preventing sampling an msprime population right at the time of its creation. (#aea231)