Description Usage Arguments Value Other Functions Required Author(s) Examples
Select an independent random sample from a point, linear, or areal frame. Frame features must be located in a 1-dimensional or 2-dimensional coordinate system. Sample may be equal probability or unequal probability (either categorical or proportional to an auxiliary variable). May designate panels of sites for surveys over time.
1 2 3 4 5 | irs(design, DesignID = "Site", SiteBegin = 1, type.frame = "finite",
src.frame = "shapefile", in.shape = NULL, sf.object = NULL,
sp.object = NULL, att.frame = NULL, id = NULL, xcoord = NULL,
ycoord = NULL, stratum = NULL, mdcaty = NULL, maxtry = NULL,
shapefile = TRUE, prjfilename = NULL, out.shape = "sample.shp")
|
design |
Named list of stratum design specifications which are also lists. Stratum names must be subset of values in stratum argument. Each stratum list has four components:
Example design for a stratified sample: |
DesignID |
Name for the design, which is used to create a site ID for each site. The default is "Site". |
SiteBegin |
Number to use for first site in the design. The default is 1. |
type.frame |
The type of frame, which must be one of following: "finite", "linear", or "area". The default is "finite". |
src.frame |
Source of the frame, which equals "sf.object" if the frame is contained in an sf package object, "shapefile" if the frame is to be read from a shapefile, "sp.object" if the frame is obtained from an sp package object, or "att.frame" if type.frame equals "finite" and the frame is included in att.frame. The default is "shapefile". |
in.shape |
Name of a shapefile containing the frame, which is required when src.frame equals "shapefile". The shapefile name should include the ".shp" extension. If the name does not include that extension, it will be added. The default is NULL. |
sf.object |
An sf package object containing the frame, which is required when src.frame equals "sf.object". The default is NULL. |
sp.object |
An sp package object containing the frame, which is required when src.frame equals "sp.object". The default is NULL. |
att.frame |
Data frame composed of attributes associated with elements in the frame. If src.frame equals "att.frame", then att.frame must include columns that contain x-coordinates and y-coordinates for each element in the frame. If src.frame does not equal "att.frame" and att.frame is not equal to NULL, then an sf object is created from att.frame and the geometry column from the object named "sf.object" that is created by the function. The default is NULL. |
id |
This argument is depricated. |
xcoord |
Character string containing the name of the column from att.frame that identifies x-coordinates, which is required when src.frame equals "att.frame". The default is NULL. |
ycoord |
Character string containing the name of the column from att.frame that identifies y-coordinates, which is required when src.frame equals "att.frame". The default is NULL. |
stratum |
Character string containing the name of the attribute in sf.object that identifies stratum membership for each feature. If stratum equals NULL, the design is unstratified, and an attribute named "stratum" (with all of its elements equal to the stratum name specified in design) is added to sf.object. The default is NULL. |
mdcaty |
Character string containing the name of the attribute in sf.object that identifies the unequal probability category for each feature. The default is NULL. |
maxtry |
This argument is depricated. |
shapefile |
Option to create a shapefile containing the survey design information, where TRUE equals create a shapefile and FALSE equals do not create a shapefile. The default is TRUE. |
prjfilename |
This argument is depricated. |
out.shape |
Name of the output shapefile. The default is "sample.shp". |
An object of class SpatialDesign containing the survey design information and any additional attribute variables that were provided. Optionally, a shapefile can be created that contains the survey design information.
irsarea
select an IRS sample of an area resource
irslin
select an IRS sample of a linear resource
irspts
select an IRS sample of a finite resource
mdmarea
calculate multidensity-density multipliers for an area resource
mdmlin
calculate multidensity-density multipliers for a linear resource
mdmpts
calculate multidensity-density multipliers for a finite resource
Tom Kincaid Kincaid.Tom@epa.gov
1 2 3 4 5 6 7 8 9 10 11 | ## Not run:
test_design <- list(
Stratum1=list(panel=c(PanelOne=50), seltype="Equal", over=10),
Stratum2=list(panel=c(PanelOne=50, PanelTwo=50), seltype="Unequal",
caty.n=c(CatyOne=25, CatyTwo=25, CatyThree=25, CatyFour=25), over=75))
test_sfobject <- st_read("test_shapefile.shp")
test_sample <- irs(design=test_design, DesignID="TestSite",
type.frame="area", src.frame = "sf.object", sf.object=test_sfobject,
stratum="test_stratum", mdcaty="test_mdcaty")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.