DGVMTools v1.1.0 release (2023-12-15)
The primary purpose of this release is to ditch the dependencies on removed or deprecated functionality from other packages. In particular the dropping of the maps, maptools and mapdata packages and replacing them with rnaturalearth and rnaturalearthdata. There are other bugfixes and changes, see below.
Modernization
- The
maps,maptoolsandmapdatapackages have been replaced withrnaturalearthandrnaturalearthdata(also removing the dependency onrgeos) for building country and continental outlines. The options available for themap.overlayargument are now "world", "countries" or "ne_countries" for full country outlines (all equivalent) or "coastlines" or "ne_coastlines" for coastlines only (both equivalent). Note these packages also have lots of other nice things what you can put on your plots (usingsfandggplot2) - In a similar vein,
selectGridcells()(and thereforegetField()) can now read takesfobjects (but no longermaps) objects. SpatRastobjects fromterraare now handled without conversion toraster.rasterandspare still used in the package but only for exporting objects of those packages. Overall, the functionality ofDGVMToolsdoesn't depend onsporrasterany more, so they can be easily deprecated and removed in future releases.- Plotting arguments are more consistent with
ggplot2, withlinewidthreplacingsizeforgeom_line(in accordance with theggplot2deprecation) - Usage of the deprecated
aes_string()function has been removed (behind the scenes only)
Breaking changes
- The
map.overlayargument now takes strings based onrnaturalearthrather thanmaps(see above). selectGridcels()now takessfobjects instead ofmapsobjects. Thernaturalearthpackage is a good place to get country outlines to use here, it is a great replacement formaps.- The
plotSubannual()function now has argumentssizeandlinewidthinstead ofpoint.sizeandline.widthrespectively.
Other improvements
- Can now specify lons and lats to function addArea() which is useful for area calculations in sparse grids.
Bugfixes
- Argument
text.multipliernow handled properly inplotSubannual(). Thanks Drew! - Bugfix when first.year/last.year is NULL
- Bugfix in
plotSubannual()to use the specified summary function and not always the mean.