Learn R Programming

spsurvey (version 4.0.0)

sbcsamp: Calculate Spatial Balance Grid Cell Extent and Proportions for a Survey Design

Description

This function calculates spatial balance grid cell extent and proportions for a survey design. The user must provide either sbc.frame or values for dx, dy, xc, and yc.

Usage

sbcsamp(sp.sample, sbc.frame = NULL, dx = NULL, dy = NULL,
  xc = NULL, yc = NULL)

Arguments

sp.sample

The sp package object of class "SpatialPointsDataFrame" produced by the grts or irs functions that contains survey design information.

sbc.frame

The object created by the sbcframe function. The default is NULL.

dx

Grid cell x-coordinate increment value. The default is NULL.

dy

Grid cell y-coordinate increment value. The default is NULL.

xc

Vector of grid cell x-coordinates. The default is NULL.

yc

Vector of grid cell y-coordinates. The default is NULL.

Value

List containing the following components:

extent

the sample extent for each grid cell

prop

the sample proportion for each grid cell

Other Functions Required

readShapeFilePts

C function to read the shp file of a point shapefile and return a data frame containing the x-coordinates and y-coordinates for elements in the frame

cell.wt

calculates number of points in a cell for a points object