Releases: USEPA/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 emptyLINESTRING
orPOLYGON
geometries. - Fixed a bug that prevented
grts()
andirs()
from returning coordinates when the thegeometry
column ofsframe
was not"geometry"
andlegacy_sites
was specified (#40).
spsurvey 5.5.0
spsurvey 5.5.0
Minor Updates
n_over
is now recycled if the design is stratified andn_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 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_levels
andstressor_levels
.
Previously, ifresponse_levels
andstressor_levels
were specified,
their elements required names.
Now, ifresponse_levels
is specified and its names areNULL
, then its names are set tovars_response
,
and ifstressor_levels
is 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 insframe
was named"siteID"
,"siteuse"
,"replsite"
,
"lon_WGS84"
,"lat_WGS84"
,"stratum"
,"wgt"
,"ip"
,"caty"
,"aux"
,
xcoord
,ycoord
, oridpts
and 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_frame
objects for use withplot()
andsummary()
for sampling frames and analysis data.sp_frame
objects have classsp_frame
.
- Added an
sp_unframe()
function to transformsp_frame
objects back into their original object type. - Objects output from
grts()
andirs()
are now calledsp_design
objects instead ofspdesign
objects.sp_design
objects have classsp_design
.
summary()
now works withsp_frame
objects andsp_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 summarizesf
object geometries if the name of the geometry list-column is provided in the summary formula.plot()
now works withsp_frame
objects andsp_design
objects.sp_plot()
yields equivalent plots and is currently maintained for backwards compatibility (i.e.,sp_plot()
has not changed).
plot()
now works withsp_CDF
objects that are output from theCDF
element 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_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
, andaux_var
elements to the design list insp_design
objects. - Added
legacy_stratum_var
,legacy_caty_var
, andlegacy_aux_var
elements to the design list insp_design
objects when legacy sites are used. - Added a
"total"
option totest
inchange_analysis()
. - Minor documentation updates.
- Minor vignette updates.
- Minor stability updates.
Bug fixes
- Fixed a bug that prevented proper printing of the
Indicator
column when usingchange_analysis()
withtest = median
. - Fixed a bug that made
change_analysis
sensititve to the ordering of the levels of variables invar_cat
if those variables were factors. - Fixed a bug in
sp_summary()
that incorrectly ordered thesiteuse
variable. - Fixed a bug in
sp_summary()
that failed to summarize data frames that did not have ansf_column
attribute. - Fixed a bug in
*_analysis()
functions whenpopsize
is 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 invars
for at least one level of one variable insubpops
. - Fixed a bug in
grts()
that caused an error for some combinations ofn_base
andn_over
. - Fixed a bug in
change_analysis()
that returned an error when at least one varible invars_cat
has only one unique value.
spsurvey 5.3.0
Minor updates
- Added a
projcrs_check
argument 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_levels
to not be found. - Fixed a bug in
grts()
andirs()
that returned an error when the name of thegeometry
column insframe
andlegacy_sites
differed. Now when this occurs, thegeometry
column inlegacy_sites
is renamed to have the same name as the geometry column insframe
. - Fixed a bug in
grts()
andirs()
that preventedlegacy_stratum_var
,legacy_caty_var
andlegacy_aux_var
from performing properly. - Fixed a bug in
grts()
andirs()
that returned an error when at least one stratum inlegacy_sites
had 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 insframe
orlegacy_sites
were 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_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()
andirs()
whenlegacy_stratum_var
(andlegacy_caty_var
andlegacy_aux_var
) areNULL
but the name ofstratum_var
insframe
is not contained inlegacy_sites
. - Added an error in
grts()
andirs()
that checks whethersframe
andlegacy_sites
have the same crs. - Updated documentation for
pt_density
ingrts()
andirs()
to indicate thatpt_density
must 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_over
be an integer and removingcaty_n_over
. - Added an argument to
grts()
andirs()
calledsep
, which acts as a separator between the character string created byDesignID
andSiteBegin
in thesites
output. - The
pt_density
argument ingrts()
andirs()
now reflects the site multiplier (instead of the per-unit density ofsframe
) that generates the approximation tosframe
when sampling fromLINESTRING
,MULTILINESTRING
,POLYGON
, orMULTIPOLYGON
sf objects.
Bug fixes
- Fixed a bug in
grts()
andirs()
that prevented use when the geometry column ofsframe
was 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 copiedstratum
values ascaty
values in thesites
output. - Fixed a bug in
grts()
andirs()
that prevented sampling fromLINESTRING
,MULTILINESTRING
,POLYGON
, orMULTIPOLYGON
sf objects whenpt_density
was excessively large.
spsurvey 5.1.0
Minor updates
- Added a
Total
option to thestatistics
argument 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_bbox
argument 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_over
argument 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_over
andn_near
arguments ingrts()
andirs()
(list arguments were already supported). - Added a default value for
siteID
inattrisk_analysis()
,cat_analysis()
,cont_analysis()
,diffrisk_analysis()
, andrelrisk_analysis()
that assumes each row indframe
represents 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 fromsframe
when the geometry type wasLINESTRING
,MULTILINESTRING
,POLYGON
, orMULTIPOLYGON
and the number of desired samples exceeded the number of rows.
spsurvey 5.0.1
Bug fix
- Addressed Solaris performance problems.
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 ansf
object. -
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.
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.