Learn R Programming

spsurvey (version 4.0.0)

irslin: Select an Independent Random Sample (IRS) of a Linear Resource

Description

This function selects an IRS of a linear resource.

Usage

irslin(shapefilename = NULL, linframe, samplesize = 100,
  SiteBegin = 1)

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.

linframe

Data frame containing id, mdcaty, len, and mdm.

samplesize

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

SiteBegin

First number to start siteID numbering. The default is 1.

Value

Data frame of sample points containing: siteID, id, x, y, mdcaty, and weight.

Other Functions Required

linSampleIRS

C function to select a sample from a linear resource