Learn R Programming

spsurvey (version 3.4)

irsarea: Select an Independent Random Sample (IRS) of an Area Resource

Description

This function selects an independent random sample (IRS) of an area resource.

Usage

irsarea(shapefilename=NULL, areaframe, samplesize=100, SiteBegin=1, maxtry=1000)

Arguments

shapefilename

name of the input shapefile. If shapefilename equals NULL, then the shapefile or shapefiles in the working directory are used. The default is NULL.

areaframe

a data frame containing id, mdcaty and mdm.

samplesize

number of points to select in the sample. The default is 100.

SiteBegin

number to use for first site in the design. The default is 1.

maxtry

maximum number of iterations for randomly generating a point within the frame to select a site when type.frame equals "area". The default is 1000.

Value

A data frame of IRS sample points containing: SiteID, id, x, y, mdcaty, and weight.

See Also

irs