Releases: USEPA/spsurvey
Releases · USEPA/spsurvey
Release list
spsurvey 5.6.1
spsurvey 5.6.1
Minor Updates
- In the
cont_cdftestexample, updated thetestnameargument incont_cdftest()to the default value,"adjWald". - Minor unit testing updates.
spsurvey 5.6.0
spsurvey 5.6.0
Major Updates
- Removed startup message that warned users about the major changes to spsurvey resulting from the upgrade to version 5.0.0.
- Added two new vignettes, one providing an overview of statistical surveys and another providing some details about survey design weighting.
- Removed all vignettes from the CRAN webpage except the "Start Here" vignette. All vignettes are now hosted on the
spsurveywebsite available here in the "Articles" tab.
Minor Updates
- Removed the error from
adjwgtNR()that occurred when at least one level ofMARClassdid not have a value fromTRClassinEvalStatusand replaced it with a warning. MARClassinadjwgtNR()now has a default value that assumes all sample units are from the same MAR class.- Added an error message when at least one value of
caty_varinsframeis not among the names of thecaty_nvariable #42.
spsurvey 5.5.1
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()andirs()from working properly with emptyLINESTRINGorPOLYGONgeometries. - Fixed a bug that prevented
grts()andirs()from returning coordinates when the thegeometrycolumn ofsframewas not"geometry"andlegacy_siteswas specified (#40).
spsurvey 5.5.0
spsurvey 5.5.0
Minor Updates
n_overis now recycled if the design is stratified andn_overis 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 usingmessage()instead ofcat(). 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 ofresponse_levelsandstressor_levels.
Previously, ifresponse_levelsandstressor_levelswere specified,
their elements required names.
Now, ifresponse_levelsis specified and its names areNULL, then its names are set tovars_response,
and ifstressor_levelsis specified and its names areNULL, then its names are set tovars_stressor(#33).
Bug Fixes
- Fixed a bug that caused an erorr in
grts()andirs()occurred when at least
one variable name insframewas named"siteID","siteuse","replsite",
"lon_WGS84","lat_WGS84","stratum","wgt","ip","caty","aux",
xcoord,ycoord, oridptsand the name of the geometry column insframe
was not named"geometry"(#32).
spsurvey 5.4.1
spsurvey 5.4.1
Minor Updates
- Updated citation information to Dumelle et al. (2023) doi:10.18637/jss.v105.i03.
spsurvey 5.4.0
Minor Updates
- Added an
sp_frame()function to createsp_frameobjects for use withplot()andsummary()for sampling frames and analysis data.sp_frameobjects have classsp_frame.
- Added an
sp_unframe()function to transformsp_frameobjects back into their original object type. - Objects output from
grts()andirs()are now calledsp_designobjects instead ofspdesignobjects.sp_designobjects have classsp_design.
summary()now works withsp_frameobjects andsp_designobjects.sp_summary()yields equivalent summaries and is currently maintained for backwards compatibility (i.e.,sp_summary()has not changed).
summaryfunctions now also summarizesfobject geometries if the name of the geometry list-column is provided in the summary formula.plot()now works withsp_frameobjects andsp_designobjects.sp_plot()yields equivalent plots and is currently maintained for backwards compatibility (i.e.,sp_plot()has not changed).
plot()now works withsp_CDFobjects that are output from theCDFelement ofcont_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()orsp_summary()so that they are clearer and easier to read. - Added a print function for
sp_designobjects. Now, a summary of site counts by site type (Legacy,Base,OverNear) crossed by strata or unequal probability levels or both is provided. - Added
stratum_var,caty_var, andaux_varelements to the design list insp_designobjects. - Added
legacy_stratum_var,legacy_caty_var, andlegacy_aux_varelements to the design list insp_designobjects when legacy sites are used. - Added a
"total"option totestinchange_analysis(). - Minor documentation updates.
- Minor vignette updates.
- Minor stability updates.
Bug fixes
- Fixed a bug that prevented proper printing of the
Indicatorcolumn when usingchange_analysis()withtest = median. - Fixed a bug that made
change_analysissensititve to the ordering of the levels of variables invar_catif those variables were factors. - Fixed a bug in
sp_summary()that incorrectly ordered thesiteusevariable. - Fixed a bug in
sp_summary()that failed to summarize data frames that did not have ansf_columnattribute. - Fixed a bug in
*_analysis()functions whenpopsizeis a list intended for use withsurvey::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 invarsfor at least one level of one variable insubpops. - Fixed a bug in
grts()that caused an error for some combinations ofn_baseandn_over. - Fixed a bug in
change_analysis()that returned an error when at least one varible invars_cathas only one unique value.
spsurvey 5.3.0
Minor updates
- Added a
projcrs_checkargument togrts()andirs(), which checks whether projected coordinates are required (projcrs_check = TRUE) or not (projcrs_check = FALSE). - Nearest neighbor replacement sites (specified by
n_near) ingrts()orirs()are now also generated for each observation inlegacy_sites.
Bug fixes
- Fixed a bug in
attrisk_analysis(),diffrisk_analysis(), andrelrisk_analysis()that sometimes caused names inresponse_levelsto not be found. - Fixed a bug in
grts()andirs()that returned an error when the name of thegeometrycolumn insframeandlegacy_sitesdiffered. Now when this occurs, thegeometrycolumn inlegacy_sitesis renamed to have the same name as the geometry column insframe. - Fixed a bug in
grts()andirs()that preventedlegacy_stratum_var,legacy_caty_varandlegacy_aux_varfrom performing properly. - Fixed a bug in
grts()andirs()that returned an error when at least one stratum inlegacy_siteshad zero observations. - Fixed a bug in
grts()andirs()that preventedwarnprnt()from performing properly. - Removed the warning in
grts()andirs()that indicated when m or z values insframeorlegacy_siteswere dropped. Now, the dropping of m or z values is explained in the documentation. - Removed a warning in
grts()andirs()that indicated when row names were set iflegacy_siteswas a tibble. Now,legacy_sitesis coerced to a base R data frame (i.e., not a tibble) before setting row names. - Added an error in
grts()andirs()whenlegacy_stratum_var(andlegacy_caty_varandlegacy_aux_var) areNULLbut the name ofstratum_varinsframeis not contained inlegacy_sites. - Added an error in
grts()andirs()that checks whethersframeandlegacy_siteshave the same crs. - Updated documentation for
pt_densityingrts()andirs()to indicate thatpt_densitymust be a positive integer. - Fixed a bug in
sp_summary()that returned an error whenformula = ~ .and the geometry column was not named"geometry". Now,sp_summary()works withformula = ~ .regardless of the name of the geometry column. - Fixed a bug in
grts()andirs()that affected minimum distance performance when legacy sites were used.
spsurvey 5.2.0
Minor updates
- Made it easier in
grts()andirs()to specify reverse hierarchically ordered replacement sites with unequal selection probabilities by requiringn_overbe an integer and removingcaty_n_over. - Added an argument to
grts()andirs()calledsep, which acts as a separator between the character string created byDesignIDandSiteBeginin thesitesoutput. - The
pt_densityargument ingrts()andirs()now reflects the site multiplier (instead of the per-unit density ofsframe) that generates the approximation tosframewhen sampling fromLINESTRING,MULTILINESTRING,POLYGON, orMULTIPOLYGONsf objects.
Bug fixes
- Fixed a bug in
grts()andirs()that prevented use when the geometry column ofsframewas not named"geometry". - Fixed a bug in
grts()andirs()that sometimes caused unequal selection probabilities to be misrepresented when reverse hierarchically ordered replacement sites were desired. - Fixed a bug in
grts()andirs()that sometimes prevented the dropping of an sf object's z or m dimension. - Fixed a bug in
grts()andirs()that sometimes incorrectly copiedstratumvalues ascatyvalues in thesitesoutput. - Fixed a bug in
grts()andirs()that prevented sampling fromLINESTRING,MULTILINESTRING,POLYGON, orMULTIPOLYGONsf objects whenpt_densitywas excessively large.
spsurvey 5.1.0
Minor updates
- Added a
Totaloption to thestatisticsargument incont_analysis(). - Added
localmean_weight(),localmean_var(), andlocalmean_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_bboxargument insp_plot(). - Added an error message to
grts()andirs()that stops the function when geographic coordinates are used. - Added an error message to
grts()andirs()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_overargument togrts()andirs()that makes it easier to specify reverse hierarchically ordered replacement sites for unequal probability sampling designs. - Added vector argument support for the
n_overandn_neararguments ingrts()andirs()(list arguments were already supported). - Added a default value for
siteIDinattrisk_analysis(),cat_analysis(),cont_analysis(),diffrisk_analysis(), andrelrisk_analysis()that assumes each row indframerepresents a unique site.
Bug fixes
- Fixed a bug in
irs()that made the algorithm sensitive to the ordering ofsframe. - Fixed a bug in percentile estimation from
cont_analysis()that incorrectly copied estimate values. - Fixed a bug in
grts()andirs()that prevented sampling fromsframewhen the geometry type wasLINESTRING,MULTILINESTRING,POLYGON, orMULTIPOLYGONand the number of desired samples exceeded the number of rows.
spsurvey 5.0.1
Bug fix
- Addressed Solaris performance problems.