Skip to content

sgsR v.1.4.0

Compare
Choose a tag to compare
@tgoodbody tgoodbody released this 09 Feb 18:26
· 41 commits to main since this release

sgsR 1.4.0

added - sample_sys_strat() - Systematic stratified sampling. Using same functionality as sample_systematic() but takes an sraster as input and performs sampling on each stratum iteratively.

enhanced - strat_breaks() - Vectorized function to allow for any number of input mraster layers and a corresponding number of breaks vectors (as list in respective order as mraster layers). Removed mraster2 & breaks2. Users can now supply an mraster with as many layers as they wish. Added map to allow for creating a combined (mapped) stratification output (strata). Internal function calculate_breaks() was added that facilitates vectorization.

enhanced - strat_quantiles() - Vectorized function to allow for any number of input mraster layers and a corresponding number of breaks vectors (as list in respective order as mraster layers). Removed mraster2 & nStrata2. Users can now supply an mraster with as many layers as they wish along side nStrata as a list with length(nStrata) == terra::nlyr(mraster). nStrata can be either a scalar integer representing the number of desired output strata, or a numeric vector of probabilities between 0-1 demarcating quantile break points. The nStrata list can be a mix of these (e.g. nStrata = list(c(0.1,0.8,1), 4, 9) where mraster would have 3 layers) to allow users to define both explicit quantile breaks or a desired strata number that is converted to quantiles breaks internally. Added map to allow for creating a combined (mapped) stratification output (strata). Internal functions calculate_quantile_breaks() / quantile_breaks_integer() / quantile_breaks() were added that facilitate vectorization.

enhanced - strat_map() - Vectorized function to allow for any number of input mraster layers and a corresponding number of breaks vectors (as list in respective order as mraster layers). Removed raster2. Users can now supply an sraster with as many layers as they wish. Thank you, Tommaso Trotto.

enhanced - Updated vignettes and documentation to account for vectorized functionality of the above functions.

enhanced - plot_scatter() - now visualizes with viridis colour scheme.

fixed - Added new citation information for upcoming manuscript release.

fixed - extract_strata() / extract_metrics() - CRS for existing will now be maintained when provided as an sf and the mraster CRS will be assigned otherwise. In addition, all sampling functions will maintain CRS from existing if possible, otherwise CRS from sraster/mraster are used for output samples.

Manuscript publication and citation:

added - link to open access publication on sgsR.

#> To cite package 'sgsR' in publications use:
#> 
#>   Goodbody, TRH., Coops, NC., Queinnec, M., White, JC., Tompalski, P.,
#>   Hudak, AT., Auty, D., Valbuena, R., LeBoeuf, A., Sinclair, I.,
#>   McCartney, G., Prieur, J-F., Woods, ME. (2023). sgsR: a structurally
#>   guided sampling toolbox for LiDAR-based forest inventories. Forestry:
#>   An International Journal of Forest Research.
#>   10.1093/forestry/cpac055.
#> 
#> A BibTeX entry for LaTeX users is
#> 
#>   @Manual{,
#>     title = {sgsR: a structurally guided sampling toolbox for LiDAR-based forest inventories.},
#>     author = {Tristan R.H. Goodbody and Nicholas C. Coops and Martin Queinnec and Joanne C. White and Piotr Tompalski and Andrew T. Hudak and David Auty and Ruben Valbuena and Antoine LeBoeuf and Ian Sinclair and Grant McCartney and Jean-Francois Prieur and Murray E. Woods},
#>     journal = {Forestry: An International Journal of Forest Research},
#>     year = {2023},
#>     doi = {10.1093/forestry/cpac055},
#>   }
#> 
#>   Tristan RH Goodbody, Nicholas C Coops and Martin Queinnec (2023).
#>   Structurally Guided Sampling. R package version 1.4.0.
#>   https://cran.r-project.org/package=sgsR.
#> 
#> A BibTeX entry for LaTeX users is
#> 
#>   @Manual{,
#>     title = {Structurally Guided Sampling},
#>     author = {Tristan RH Goodbody and Nicholas C Coops and Martin Queinnec},
#>     year = {2023},
#>     note = {R package version 1.4.0},
#>     url = {https://cran.r-project.org/package=sgsR},
#>   }