Recent Releases of spsurvey
spsurvey - 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).
- R
Published by michaeldumelle over 2 years ago
spsurvey - 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(), andrelrisk_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 insframewas not named"geometry"(#32).
- R
Published by michaeldumelle about 3 years ago
spsurvey - spsurvey 5.4.1
spsurvey 5.4.1
Minor Updates
- Updated citation information to Dumelle et al. (2023) doi:10.18637/jss.v105.i03.
- R
Published by michaeldumelle over 3 years ago
spsurvey - 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.
- R
Published by michaeldumelle over 3 years ago
spsurvey - 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.
- R
Published by michaeldumelle over 4 years ago
spsurvey - 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.
- R
Published by michaeldumelle over 4 years ago
spsurvey - 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.
- R
Published by michaeldumelle over 4 years ago
spsurvey - spsurvey 5.0.1
Bug fix
- Addressed Solaris performance problems.
- R
Published by michaeldumelle over 4 years ago
spsurvey - spsurvey 5.0.0
Major Updates
Syntax for the
grts()(Generalized Random Tessellation Stratified) andirs()(Independent Random Sampling) functions has been significantly simplified. These functions now require the sampling frame is ansfobject.The
grts()andirs()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.
- R
Published by michaeldumelle over 4 years ago
spsurvey - spsurvey 4.1.4
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.
- R
Published by michaeldumelle almost 5 years ago
spsurvey - spsurvey 4.1.3
Bug fix
Fixed code so that sp design objects inherit CRS of input files and shapefiles written out also have inherited projection from input file. (#2)
Variable sframe$len was used in grts function and never defined. Now uses length_mdm that is calculated earlier. (#6)
- R
Published by mhweber almost 6 years ago
spsurvey - spsurvey 4.1.2
Bug fix
- Update test data and Description file to handle changes in
sfand changes tocrsdescribed here
- R
Published by mhweber about 6 years ago
spsurvey - spsurvey 4.1.1
Bug fix
- Fix to
localmean.weightfunction to correct when class for matrix objects was causing an indicator variable to have length two rather than length one, which caused an error in a while statement.
- R
Published by mhweber over 6 years ago