- 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).
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()
, andrelrisk_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).
- Fixed a bug that caused an error 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).
- Updated citation information to Dumelle et al. (2023) doi:10.18637/jss.v105.i03.
- 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.
- Fixed a bug that prevented proper printing of the
Indicator
column when usingchange_analysis()
withtest = median
. - Fixed a bug that made
change_analysis
sensitive 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 variable invars_cat
has only one unique value.
- 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
.
- 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.
- 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.
- 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.
- 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.
- 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.
- Addressed Solaris performance problems.
-
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.
- Several functions have undergone minor changes to syntax and scope.
- 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.
- 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.
-
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)
- Update test data and Description file to handle changes in
sf
and changes tocrs
described here
- Fix to
localmean.weight
function 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.
-
Functions that create survey designs were modified to replace use of shapefiles to provide the survey frame with use of simple features
sf
objects to provide the survey frame. To accommodate this change, argument src.frame for functionsgrts
andirs
now will accept the choicesf.object
to indicate that ansf
object will be used as the source of the survey frame. In addition, a new argument namedsf.object
was added to functionsgrts
andirs
to allow input of ansf
object as the survey frame. Also, note that arguments id, maxtry, and prjfilename for functionsgrts
andirs
have been depricated since they are no longer needed. Finally, the three rda files in the data directory that contain survey frame objects (NE_lakes
,Luck_Ash_streams
, andUT_ecoregions
) were revised to containsf
objects rather than objects belonging to classes that are defined in thesp
package. -
The package no longer contains any functions written in C. The C functions were either no longer required due to the transition to use of
sf
objects to contain the survey frame or were replaced with functions written in R. The new R functions are:cellWeight
,constructAddr
,insideAreaGridCell
,insideLinearGridCell
,make_grid
,numLevels
,pickFiniteSamplePoints
,pickGridCells
,pickSamplePoints
,ranho
, andselectFeatureID
.
- The new R code function named
numLevels
that determines the number of hierarchical levels for a generalized random-tessellation stratified (GRTS) survey design now includes code to ensure that the maximum number of levels (which is currently 11) is not bypassed when creating a survey design.
- Modified function
input.check
to check for missing values among the x-coordinates and y-coordinates for location.
-
Necessary changes were enacted so that the package can be built within RStudio, e.g., roxygen comments were added to R source files.
-
Created functions that create panel designs and that compute and plot power for panel designs given a linear trend. Function
revisit_dsgn
creates a panel revisit design. Functionrevisit_bibd
creates a balanced incomplete block panel revisit design. Functionrevisit_rand
creates a revisit design with random assignment to panels and time periods. Functionpanel_summary
summarizes characteristics of a revisit panel design. Functionpower.dsgn
calculates power for multiple panel designs. Functioncov.panel.dsgn
creates the covariance matrix for a panel design. Functionplot.powerpaneldesign
plots power curves for panel designs.
- Modified C function
readDbfFile
to avoid PROTECT errors.
-
Modified C functions
insideAreaGridCell
,insideLinearGridCell
,linSample
,linSampleIRS
,numLevels
,pickAreaSamplePoints
,pickLinearSamplePoints
, andpointInPolygonFile
to avoid PROTECT errors. -
Modified function
change.analysis
to assign the support_2 variable from the design_2 data frame rather than from the design_1 data frame. -
Modified function
change.analysis
to use a revised procedure for ensuring that each repeated visit site is present in both surveys for subpopulation estimation. -
Modified C functions
writeShapeFilePoint
andwriteShapeFilePolygon
to correct memory access errors. -
Modified C function
readDbfFile
to ensure that missing values (NA) are handled correctly.
- Inserted a SystemRequirements field in the DESCRIPTION file and modified functions
grts
,grtsarea
,grtslin
,grtspts
,irs
,irsarea
,irslin
,read.dbf
, andread.shape
to prevent the functions from being executed on big-endian processors.
- Removed the C header file named
order.h
and replaced C functionsreadBigEndian
andreadLittleEndian
with the version of those functions fromspsurvey
version 3.1.
-
Created a vignette for change estimation.
-
Modified functions
change.analysis
andchange.est
to include estimation for difference in median values for change estimation using continuous variables. -
Created a function named
examine
that examines variables in a data frame by printing either a table or the results of a call to the describe function in theHmisc
package.
-
Modified function
sp2shape
to accommodate objects of classSpatialDesign
created by either thegrts
orirs
functions. -
Added a C header file named
order.h
that determines whether the CPU employs big-endian or little-endian byte order. Also, modified C functionsreadBigEndian
andreadLittleEndian
to use constants created by the header file to ensure that computer words are read in the correct byte order. -
Modified function
input.check
to ensure that use of numeric variables for argumentsstratum
andcluster
are handled correctly when finite or continuous population correction factors are utilized. -
Modified function
cdf.test
to ensure upper bounds that define classes for the CDFs are unique. Also, modified functionscont.cdftest
andcdf.test
to reduce the minimum number of upper bounds that define classes for the CDFs from three to two. -
Modified functions
sp2shape
andread.dbf
to ensure that missing values are handled without error for character vectors. -
Modified functions
grts
andirs
to ensure that adataframe
object is assigned to argumentatt.frame
when argumentsrc.frame
is assigned valueatt.frame
. -
Modified function
change.analysis
to ensure that each repeated visit site is present in both surveys for subpopulation estimation. -
Modified function
read.sas
to use "C:/Program Files/SASHome/SASFoundation/9.4/sas.exe" as the default value for argumentsascmd
.
- Modified vignettes to use data sets from the data directory for the package.
- Modified C functions to ensure that variables passed to function
malloc
are of type unsigned integer.
-
Created a class named
SpatialDesign
that contains classSpatialPointsDataFrame
, which is defined in packagesp
. The class is used for the output objects created by functionsgrts
andirs
. Objects of classSpatialDesign
include the survey design list as a slot rather than as an attribute, which was used previously. -
Created S3 and S4 methods for generic functions
plot
andsummary
for objects of classSpatialDesign
.
-
Modified C functions to change the type declaration for variable
shpFileName
fromconst char *
tochar * restrict
. -
Modified C functions
writeDbfFile
,writeShapeFilePoint
, andwriteShapeFilePolygon
to change the return type from void to SEXP NULL, i.e., R_NilValue. -
Modified function
input.check
to remove missing values from final adjusted weights prior to checking that all values are positive. -
Modified functions
grtspts
,grtslin
, andgrtsarea
to ensure that argumentnlev
(number of hierarchical levels) for C functionconstructAddr
was stored as type integer.
- Added a
cex.main
argument to thecont.cdfplot
andcdf.plot
functions.
- Modified function
warnprnt
to use correct variable names in the output data frame so that partial matching warnings for the names are not generated.
- Created a data directory that contain rda versions of the data files used by vignettes.
-
Modified function
change.analysis
to allow analysis of surveys with no repeat visit sites. -
Modified function
change.est
to ensure that levels for a categorical response variable are listed in the desired order rather than sorted order. -
Modified function
localmean.weight
to allow recovery from an error in the singular value decomposition functionLa.svd
that is called by the generalized inverse functionginv
in theMASS
package. Also, created a support function namedlocalmean.weight2
.
- Modified function
grtspts
and C functionnumLevels
to calculate the sampling grid random shift values only once rather than each time the number of hierarchical levels is incremented.
-
Modified functions
attrisk.analysis
,cat.analysis
,change.analysis
,cont.analysis
, andrelrisk.analysis
to replace NA values with FALSE in the indicator variables for subpopulations. -
Modified function
spbalance
to include all grid cells with nonzero extent for the frame when calculating the Pielou evenness measure for a rectangular grid. -
Modified function
localmean.weight
to ensure that the initial set of weights are inversely proportional to distance. -
Modified functions
cont.cdftest
andcdf.test
to ensure that the number of classes into which the CDFs will be divided (binned) is at least three. -
Modified function
dframe.check
to ensure proper handling of repeated site ID values in the sites data frame.
-
Created a vignette that presents deconvolution of a cumulative distribution function (CDF) generated by a GRTS survey design.
-
Created a function named
spbalance
that calculates spatial balance metrics for a survey design. -
Created functions named
sbcframe
andsbcsamp
that calculate spatial balance grid cell extent and proportions for a sample frame and for a survey design, respectively. -
Modified function
change.est
to include calculation of resource size change estimates for categorical variables. -
Created a function named
changevar.size
to calculate covariance or correlation estimates of the estimated change in class resource size estimates between two probability surveys.
-
Modified function
change.est
to correct errors in the output values for categorical variables from survey designs that lack repeat visit sites. -
Modified the following functions to assign consecutive numbers to the row names for the output data frame(s):
attrisk.analysis
,cat.analysis
,change.analysis
,cont.analysis
,cont.cdftest
, andrelrisk.analysis
.
-
Created a function named
change.analysis
that conducts change analysis for a collection of response variables (categorical and continuous) generated by two probability surveys. -
Created functions named
change.est
,changevar.prop
, andchangevar.mean
to calculate estimates of change and its associated variance. -
Created a vignette that presents cumulative distribution function (CDF) analysis of a GRTS survey design.
-
Added a function named
ash1.wgt
that computes the average shifted histogram (ASH) for weighted data.
-
Modified function
grtspts
to correct an error that occurs when argumentsrc.frame
equalsatt.frame
and the number of hierarchical levels equals eleven. -
Modified C functions
printAddrList
,printColCharList
,code{printDbf
to replace calls to theprintf
function with calls to theRprintf
function. -
Modified C function
pickAreaSamplePoints
to correct an error that occurs when selecting sample points for PolygonZ and PolygonM type shapefiles. -
Created an
.onAttach
function that prints a message when thespsurvey
package is attached. Removed the.onLoad
function, which prior versions used to to print a startup message.
-
In order to reduce package size, removed demonstration (demo) R scripts and the associated data directory.
-
Created vignettes that present analyses of GRTS survey designs for finite, linear, and areal resources.
-
Created a function named
attrisk.analysis
that conducts attributable risk analysis for a collection of response variables generated by a probability survey. -
Created functions named
attrisk.est
andattrisk.var
to calculate estimates of attributable risk and its associated variance. -
Modified function
relrisk.est
to change the way the relative risk estimate is calculated for a stratified sample. -
Modified functions
cat.analysis
,cont.analysis
,cont.cdftest
,relrisk.analysis
,category.est
,cdf.est
,cdf.decon
,total.est
,cdf.test
,relrisk.est
,catvar.prop
,catvar.size
,cdfvar.prop
,cdfvar.total
,cdfvar.size.prop
,cdfvar.size.total
,dcdfvar.prop
,dcdfvar.total
,dcdfvar.size.prop
,dcdfvar.size.total
,total.var
,cdfvar.test
, andrelrisk.var
to allow variance estimates to be calculated when a two stage sample has stage one sampling units that contain a single stage two sampling unit. Variance for those stage one sampling units is calculated using the mean of the variance estimates for stage one sampling units that contain two or more stage two sampling units. -
Modified function
grtslin
to improve efficiency of sample point selection. Created a C function namedinsideLinearGridCell
that, for each grid cell selected to receive a sample point, returns the ID value for shapefile records contained in the cell and the clipped length of the polyline segments within the cell for each record. Created a C function namedpickLinearSamplePoints
that selects sample points. -
Modified function
grtsarea
to improve efficiency of sample point selection. Created a C function namedinsideAreaGridCell
that, for each grid cell selected to receive a sample point, returns the ID value for shapefile records contained in the cell and the clipped area of the polygon within the cell for each record. Created a C function namedpickAreaSamplePoints
that selects sample points.
-
Modified function
input.check
to include determination of whether a valid value was provided for argumentvartype
. -
Modified functions
grts
andirs
so that correct survey design weights are created for linear and areal designs when the type of random selection is "continuous". -
Modified functions
grtspts
,grtslin
, andgrtsarea
to execute without error for a stratum sample size of one. -
Modified function
dframe.check
to terminate execution when missing values are encountered in the logical variable of the sites data frame.
-
Created vignettes that present examples of GRTS survey designs for finite, linear, and areal resources.
-
Created a function named
geodalbers
that projects latitude and longitude (spheroid) models of the globe to Albers projection in the plane. -
Modified function
dsgnsum
to produce summary tables for the actual set of design variables that are present rather than a standard set of design variables. -
Modified function
dframe.check
to terminate execution when missing site ID values or repeated site ID values are encountered in thesites
,design
,subpop
,data.cat
,data.cont
, ordata.rr
data frames. Note thatdframe.check
is called by functionscat.analysis
,cont.analysis
,cont.cdftest
, andrelrisk.analysis
.
-
Modified function
cont.cdftest
to correct an error caused by improper handling of an empty subpopulation. -
Modified function
relrisk.analysis
to correct an error resulting from inclusion of more than one response variable in theresponse.var
argument.
-
Eliminated use of argument
unitsize
(known sum of size-weights) by package functions. Restricted argumentpopsize
to provide only the known size of the resource for use in ratio adjustment of estimators. Created a new argument namedpcfsize
to provide resource size for calculation of finite and continuous population correction factors for single-stage samples. -
Modified functions
cat.analysis
,cont.analysis
,cont.cdftest
, andrelrisk.analysis
to add logical variables to their argument lists that specify use of finite or continuous population correction factors or use of size-weights in analysis routines. -
Modified functions
category.est
,cdf.decon
,cdf.est
,cdf.test
,relrisk.est
andtotal.est
to add logical variables to their argument lists that specify use of finite or continuous population correction factors or use of size-weights.
-
Modified function
irs
to eliminate checking for existence of x-coordinates and y-coordinates when the type of frame is "finite" and the frame is included in theatt.frame
data frame. -
Modified C functions
parseFields
andreadDbfFile
to ensure that blank values in the shapefile attributes (dbf) file are converted to R missing values (NA). -
Modified C function
writeDbfFile
to output blank values for R missing values (NA) when creating the shapefile attributes (dbf) file. -
Modified functions
grts
,irs
, andsp2shape
to ensure that an output shapefile attributes (dbf) file containing character variables with missing values can be read without error.
-
Created a function named
cont.cdftest
that tests for differences between cumulative distribution functions (CDFs) for pairs of subpopulations within a populationType
for a collection of response variables generated by a probability survey. Also, modified functioncdf.test
so that it is consistent with functions that are called by high-level functionscat.analysis
andcont.analysis
. -
Modified function
grtspts
so that, when source of the frame equals "att.frame", the current number of grid levels for hierarchical randomization and the final number of grid levels is printed to the console while the function is executing. -
Created a function named
relrisk.analysis
that conducts relative risk analysis for a collection of response variables generated by a probability survey. Also, renamed functionrelrisk
torelrisk.est
and modified the function so that it is consistent with functions that are called by high-level functionscat.analysis
andcont.analysis
. -
Modified function
grtspts
and C functionnumLevels
to terminate the algorithm for determining the number of grid levels for hierarchical randomization when the maximum value of total inclusion probability for the grid cells stops changing as the number of levels increases. -
Created functions named
cdf.plot
andcont.cdfplot
that create cumulative distribution function (CDF) plots using the data frame named "CDF" contained in the output object created by functioncont.analysis
. Functioncdf.plot
creates a single CDF plot, and functioncont.cdfplot
creates a set of CDF plots. -
Created a function named
read.sas
that can read SAS datasets or a SAS XPORT (transport) file.
-
Modified C functions
intersect
,linSampleIRS
,lintFcn
, andlinSample
to eliminate warning messages that were generated during package creation. -
Modified function
grts
so that argumentdo.sample
provides a value for each stratum. -
Modified C functions
getRecordShapeSizes
,readDbfFile
,parsePoints
,parsePointsZ
,parsePointsM
,parsePolygon
,parsePolygonZ
, andparsePolygonM
to generate error messages and terminate execution when a shapefile containing a Null record is encountered. -
Modified functions
irslin
andirsarea
in addition to C functiongetRecordIDs
to ensure that sample points are selected in random order for linear and areal IRS designs. -
Modified function
grts
to ensure that, when the type of random selection is "unequal", an oversample is apportioned correctly whenever the category sample sizes are proportional to the oversample size.
-
For C functions that read shapefiles from the current directory, replaced calls to
_findfirst
and_findnext
with code using calls toreaddir
. These changes were implemented to facilitate portability of the package. -
Created a C function named
matchFiles
that determines whether file names in the current directory have a desired file extension. This change was implemented to facilitate portability of the package.
-
Modified functions
grts
andirs
to accommodate use of a factor for the ID variable in the attributes data frame. -
Modified functions
grts
andirs
to ensure that sample weights are correctly adjusted when an oversample is present and the type of random selection is "Continuous".
- Modified C functions
getRecordShapeSizes
andlintFcn
to accommodate Polyline shapefiles that have multiple parts.
-
Modified functions
dsgnsum
andsp2shape
to accommodate the change in representation fromAttributeList
todata.frame
for the data slot of sp package objects belonging to classSpatialPointsDataFrame
. -
Modified functions
grts
andirs
to print a warning message when the type of frame equals "finite" and a stratum name in the design list matches only a single value in the stratum column of the attributes data frame. For this case, functiongrtspts
orirspts
is not called since the sample will be composed of a single point. -
Modified functions
grts
,grtspts
,grtslin
, andgrtsarea
to change the maximum value allowed for arguments startlev (the initial number of hierarchical levels to use for the GRTS grid) and maxlev (the maximum number of hierarchical levels to use for the GRTS grid) from 12 to 11. -
Added an example polylines dataset to the data directory.
-
Modified functions
grts
andirs
to allow use of an sp package object as the source of the frame. An argument namedsp.object
was added to the argument list forgrts
andirs
. -
Modified functions
grts
,grtspts
,grtslin
,grtsarea
,irs
,irspts
,irslin
, andirsarea
to remove use of argumentxy.frame
as an option for source of the frame. Then modified functionsgrts
,grtspts
,irs
, andirspts
to allow incorporation of frame coordinates into the attributes data frame when the type of frame equals "finite". Also, removed argumentelmsize
from functionsgrts
andirs
since the argument no longer was required.
-
Modified functions
grts
andirs
to print a warning message when the type of frame equals "finite" and a stratum name in the design list matches only a single value in the stratum column of the attributes data frame. For this case, functiongrtspts
orirspts
is not called since the sample will be composed of a single point. -
Modified functions
grts
andirs
to ensure that the ID values for elements of the frame provided in att.frame are unique. -
Modified functions
grts
andirs
to ensure that valid values are provided for thepanel
andcaty.n
arguments in the design list.
-
Added an example polygons dataset to the data directory.
-
Incorporated the CHANGES, README, and UserGuide files into the help page.
- Created a function named
sp2shape
and a C function namedwriteShapeFilePolygon
that convert objects created by packagesp
to ESRI shapefiles. Also, renamed the C functionwriteShapeFile
towriteShapeFilePoint
.
- Modified function
irsarea
and created a C function namedgetRecordIDs
to ensure that an IRS sample is selected when argumenttype.frame
is set to "area" in functionirs
.
- Modified the C functions so that the package can accommodate M-type shapefiles.
-
Modified functions
grts
andirs
to ensure that the levels ofmdcaty
(the variable in the attributes data frame that specifies the unequal probability category for each element in the frame) are equivalent to the names incaty.n
(the vector of sample sizes for each category inmdcaty
, which is required for each element of the design list for which the selection type is "Unequal"). -
Modified functions
grts
andirs
to ensure that the columns ofxy.frame
are named "x" and "y" whenxy.frame
is provided andtype.frame
equals "finite". -
Modified functions
grts
andirs
so that the sample weights are correctly adjusted when an oversample is requested and the realized sample size is less than the desired sample size.
- This is the original version of the package.