Skip to content

Releases: USEPA/spsurvey

spsurvey 5.5.1

09 Jan 19:35
a629b19
Compare
Choose a tag to compare

spsurvey 5.5.1

Bug Fixes

  • Fixed a bug in revisit_dsgn() that prevented proper printing of panels when there were multiple panels.
  • Fixed a bug that prevented grts() and irs() from working properly with empty LINESTRING or POLYGON geometries.
  • Fixed a bug that prevented grts() and irs() from returning coordinates when the the geometry column of sframe was not "geometry" and legacy_sites was specified (#40).

spsurvey 5.5.0

16 May 23:35
30bf38f
Compare
Choose a tag to compare

spsurvey 5.5.0

Minor Updates

  • n_over is now recycled if the design is stratified and n_over is a length-one numeric vector.
  • Added an adjwgtNR() function to perform non-response weight adjustments.
  • Warning and error messages from grts(), irs(), and *_analysis() functions now print using message() instead of cat(). This change makes the resulting output more consistent with standard practice and easier to suppress when desired (#36).
  • Changed default behavior in attrisk_analysis(), diffrisk_analysis(), and
    relrisk_analysis() regarding the handling of response_levels and stressor_levels.
    Previously, if response_levels and stressor_levels were specified,
    their elements required names.
    Now, if response_levels is specified and its names are NULL, then its names are set to vars_response,
    and if stressor_levels is specified and its names are NULL, then its names are set to vars_stressor (#33).

Bug Fixes

  • Fixed a bug that caused an erorr in grts() and irs() occurred when at least
    one variable name in sframe was named "siteID", "siteuse", "replsite",
    "lon_WGS84", "lat_WGS84", "stratum", "wgt", "ip", "caty", "aux",
    xcoord, ycoord, or idpts and the name of the geometry column in sframe
    was not named "geometry" (#32).

spsurvey 5.4.1

16 Jan 20:52
Compare
Choose a tag to compare

spsurvey 5.4.1

Minor Updates

  • Updated citation information to Dumelle et al. (2023) doi:10.18637/jss.v105.i03.

spsurvey 5.4.0

22 Nov 18:10
3ab9585
Compare
Choose a tag to compare

Minor Updates

  • Added an sp_frame() function to create sp_frame objects for use with plot() and summary() for sampling frames and analysis data.
    • sp_frame objects have class sp_frame.
  • Added an sp_unframe() function to transform sp_frame objects back into their original object type.
  • Objects output from grts() and irs() are now called sp_design objects instead of spdesign objects.
    • sp_design objects have class sp_design.
  • summary() now works with sp_frame objects and sp_design objects.
    • sp_summary() yields equivalent summaries and is currently maintained for backwards compatibility (i.e., sp_summary() has not changed).
  • summary functions now also summarize sf object geometries if the name of the geometry list-column is provided in the summary formula.
  • plot() now works with sp_frame objects and sp_design objects.
    • sp_plot() yields equivalent plots and is currently maintained for backwards compatibility (i.e., sp_plot() has not changed).
  • plot() now works with sp_CDF objects that are output from the CDF element of cont_analysis().
    • cdf_plot() yields equivalent plots and is currently maintained for backwards compatibility (i.e., cdf_plot() has not changed).
  • Updated print functions for summaries obtained via summary() or sp_summary() so that they are clearer and easier to read.
  • Added a print function for sp_design objects. Now, a summary of site counts by site type (Legacy, Base, Over Near) crossed by strata or unequal probability levels or both is provided.
  • Added stratum_var, caty_var, and aux_var elements to the design list in sp_design objects.
  • Added legacy_stratum_var, legacy_caty_var, and legacy_aux_var elements to the design list in sp_design objects when legacy sites are used.
  • Added a "total" option to test in change_analysis().
  • Minor documentation updates.
  • Minor vignette updates.
  • Minor stability updates.

Bug fixes

  • Fixed a bug that prevented proper printing of the Indicator column when using change_analysis() with test = median.
  • Fixed a bug that made change_analysis sensititve to the ordering of the levels of variables in var_cat if those variables were factors.
  • Fixed a bug in sp_summary() that incorrectly ordered the siteuse variable.
  • Fixed a bug in sp_summary() that failed to summarize data frames that did not have an sf_column attribute.
  • Fixed a bug in *_analysis() functions when popsize is a list intended for use with survey::calibrate().
  • Fixed a bug in *analysis() functions that returned an error while performing percentile estimation when there was no variability in at least one variable in vars for at least one level of one variable in subpops.
  • Fixed a bug in grts() that caused an error for some combinations of n_base and n_over.
  • Fixed a bug in change_analysis() that returned an error when at least one varible in vars_cat has only one unique value.

spsurvey 5.3.0

25 Feb 00:42
ac1c298
Compare
Choose a tag to compare

Minor updates

  • Added a projcrs_check argument to grts() and irs(), which checks whether projected coordinates are required (projcrs_check = TRUE) or not (projcrs_check = FALSE).
  • Nearest neighbor replacement sites (specified by n_near) in grts() or irs() are now also generated for each observation in legacy_sites.

Bug fixes

  • Fixed a bug in attrisk_analysis(), diffrisk_analysis(), and relrisk_analysis() that sometimes caused names in response_levels to not be found.
  • Fixed a bug in grts() and irs() that returned an error when the name of the geometry column in sframe and legacy_sites differed. Now when this occurs, the geometry column in legacy_sites is renamed to have the same name as the geometry column in sframe.
  • Fixed a bug in grts() and irs() that prevented legacy_stratum_var, legacy_caty_var and legacy_aux_var from performing properly.
  • Fixed a bug in grts() and irs() that returned an error when at least one stratum in legacy_sites had zero observations.
  • Fixed a bug in grts() and irs() that prevented warnprnt() from performing properly.
  • Removed the warning in grts() and irs() that indicated when m or z values in sframe or legacy_sites were dropped. Now, the dropping of m or z values is explained in the documentation.
  • Removed a warning in grts() and irs() that indicated when row names were set if legacy_sites was a tibble. Now, legacy_sites is coerced to a base R data frame (i.e., not a tibble) before setting row names.
  • Added an error in grts() and irs() when legacy_stratum_var (and legacy_caty_var and legacy_aux_var) are NULL but the name of stratum_var in sframe is not contained in legacy_sites.
  • Added an error in grts() and irs() that checks whether sframe and legacy_sites have the same crs.
  • Updated documentation for pt_density in grts() and irs() to indicate that pt_density must be a positive integer.
  • Fixed a bug in sp_summary() that returned an error when formula = ~ . and the geometry column was not named "geometry". Now, sp_summary() works with formula = ~ . regardless of the name of the geometry column.
  • Fixed a bug in grts() and irs() that affected minimum distance performance when legacy sites were used.

spsurvey 5.2.0

24 Jan 16:18
8a85e17
Compare
Choose a tag to compare

Minor updates

  • Made it easier in grts() and irs() to specify reverse hierarchically ordered replacement sites with unequal selection probabilities by requiring n_over be an integer and removing caty_n_over.
  • Added an argument to grts() and irs() called sep, which acts as a separator between the character string created by DesignID and SiteBegin in the sites output.
  • The pt_density argument in grts() and irs() now reflects the site multiplier (instead of the per-unit density of sframe) that generates the approximation to sframe when sampling from LINESTRING, MULTILINESTRING, POLYGON, or MULTIPOLYGON sf objects.

Bug fixes

  • Fixed a bug in grts() and irs() that prevented use when the geometry column of sframe was not named "geometry".
  • Fixed a bug in grts() and irs() that sometimes caused unequal selection probabilities to be misrepresented when reverse hierarchically ordered replacement sites were desired.
  • Fixed a bug in grts() and irs() that sometimes prevented the dropping of an sf object's z or m dimension.
  • Fixed a bug in grts() and irs() that sometimes incorrectly copied stratum values as caty values in the sites output.
  • Fixed a bug in grts() and irs() that prevented sampling from LINESTRING, MULTILINESTRING, POLYGON, or MULTIPOLYGON sf objects when pt_density was excessively large.

spsurvey 5.1.0

15 Dec 18:34
8cceaec
Compare
Choose a tag to compare

Minor updates

  • Added a Total option to the statistics argument in cont_analysis().
  • Added localmean_weight(), localmean_var(), and localmean_cov() functions to compute the local neighborhood variance estimator outside of the *_analysis() functions.
  • Added an option to provide a bounding box vector to the fix_bbox argument in sp_plot().
  • Added an error message to grts() and irs() that stops the function when geographic coordinates are used.
  • Added an error message to grts() and irs() that stops the function when too many expected samples are specified for at least one level of an unequal probability variable.
  • Added a caty_n_over argument to grts() and irs() that makes it easier to specify reverse hierarchically ordered replacement sites for unequal probability sampling designs.
  • Added vector argument support for the n_over and n_near arguments in grts() and irs() (list arguments were already supported).
  • Added a default value for siteID in attrisk_analysis(), cat_analysis(), cont_analysis(), diffrisk_analysis(), and relrisk_analysis() that assumes each row in dframe represents a unique site.

Bug fixes

  • Fixed a bug in irs() that made the algorithm sensitive to the ordering of sframe.
  • Fixed a bug in percentile estimation from cont_analysis() that incorrectly copied estimate values.
  • Fixed a bug in grts() and irs() that prevented sampling from sframe when the geometry type was LINESTRING, MULTILINESTRING, POLYGON, or MULTIPOLYGON and the number of desired samples exceeded the number of rows.

spsurvey 5.0.1

20 Oct 14:42
Compare
Choose a tag to compare

Bug fix

  • Addressed Solaris performance problems.

spsurvey 5.0.0

18 Oct 17:46
Compare
Choose a tag to compare

Major Updates

  • Syntax for the grts() (Generalized Random Tessellation Stratified) and irs() (Independent Random Sampling) functions has been significantly simplified. These functions now require the sampling frame is an sf object.

  • The grts() and irs() functions now accommodate legacy (or historical) sites, a minimum distance between sites, and two approaches for selecting replacement sites (reverse hierarchical ordering and nearest neighbor).

  • Syntax for the analysis functions (*_analysis()) has been significantly simplified.

  • Risk difference analysis is now available using the diffrisk_analysis() function.

  • Trend analysis is now available using the trend_analysis() function.

  • The sp_summary() function is now available to summarize sampling frames, design sites, and analysis data.

  • The sp_plot() function is now available to visualize sampling frames, design sites, and analysis data.

Minor Updates

  • Several functions have undergone minor changes to syntax and scope.

Breaking Changes

  • Several functions have changed (both inputs and outputs) and functions in version 5.0.0 are not always backwards compatible with functions from previous versions. Though we recommend users upgrade existing code to work with the current version's simpler implementations, backwards compatibility can be achieved by downloading previous versions of spsurvey.

spsurvey 4.1.4

17 Aug 21:51
Compare
Choose a tag to compare

Bug fix

  • This is a bug-fix release to specifically address issue:
  • A new check in R-devel (part of --as-cran) looks for return without ():
    this is reported on the CRAN results pages for fedora-clang and fedora-gcc.