Skip to content

v1.2.0

Compare
Choose a tag to compare
@tgoodbody tgoodbody released this 08 Aug 17:15
· 118 commits to main since this release

Fixes from previous version (v1.0.0)

sgsR 1.2.0

  • fixed - strat_kmeans() bug related to terra where the re-assignment of values to the output raster was causing issues. R Hijmans kindly suggested the edit made.

  • fixed - sample_ahels() - bug where extra attributes in existing would cause the algorithm to crash when re-merging after sampling.

  • fixed - strat_quantiles() no longer plots histogram / scatter plot when using plot = TRUE. Now correctly adds this to details list when details = TRUE.

  • new sampling method - Added sample_nc() based on the algorithm described in Melville & Stone (2016)

    • This algorithm uses kmeans clustering where the number of clusters is equal to the desired number of samples. Cluster centers are located, which then prompts the nearest neighbour raster pixel for each cluster to be located (assuming default k parameter). These nearest neighbours are the output samples. Visualization of the centers and samples can be dispayed if details = TRUE is used and $kplot is plotted.
  • fixed - sample_systematic() now has inherent randomness for lower left corner of the tessellation.

  • fixed - strat_kmeans() solved issue where only first raster layer was being involved in stratification.

sgsR 1.1.0

  • enhanced - sample_strat() - added parameter method that allows users to choose between "Queinnec" (default method implemented in previous sgsR versions) and "random" (stratified random sampling). The random method ignores much of the functionality of the algorithm to allow users to use standard stratified random sampling approaches without the use of a focal window to locate contiguous stratum cells.

  • fixed - sample_strat() factor handling improvement - GitHub issue #18

  • enhanced - calculate_allocation() improved documentation for output data frame to make attributes more clear.

  • fixed - calculate_representation() will now not plot bar chart twice & NA values in existing will not be removed.

  • fixed - existing samples with other attributes will now not break sampling using sample_ahels() / sample_clhs() if values are NA. Variables are also added back to the sample output

sgsR 1.0.0

  • First CRAN release.