Learn R Programming

spsurvey (version 4.1.4)

SpatialDesign-class: Class SpatialDesign

Description

Create the definition for class SpatialDesign, a class for spatial survey designs.

Create the wrapper function for class SpatialDesign.

Define S3 and S4 methods for summary and plot for class SpatialDesign.

Usage

SpatialDesign(design, sp_obj)

# S3 method for SpatialDesign summary(object, ..., auxvar = NULL, sfframe = NULL, tess_ind = TRUE, sbc_ind = FALSE, nrows = 5, dxdy = TRUE)

# S4 method for SpatialDesign summary(object, ..., auxvar = NULL, sfframe = NULL, tess_ind = TRUE, sbc_ind = FALSE, nrows = 5, dxdy = TRUE)

# S3 method for SpatialDesign plot(x, y, ..., sfframe = NULL, stratum = NULL, mdcaty = NULL, auxvar = NULL, pdffile = NULL, width = 8, height = 10)

# S4 method for SpatialDesign,missing plot(x, y, ..., sfframe = NULL, stratum = NULL, mdcaty = NULL, auxvar = NULL, pdffile = NULL, width = 8, height = 10)

Arguments

design

Object of class list containing specifications for the survey design.

sp_obj

Object of class SpatialPointsDataFrame containing spatial attributes that have spatial point locations.

object

SpatialDesign object.

...

Arguments passed through.

auxvar

Vector containing the names of variables in the data slot of the SpatialDesign object that identify auxiliary variables to be used to summarize the survey design or create plots of the survey design. The default is NULL.

sfframe

Object of class sf that contains the survey design frame. The default is NULL.

tess_ind

a logical variable indicating whether spatial balance metrics are calculated using proportions obtained from the intersection of Dirichlet tesselation polygons for the sample points with the frame object. TRUE means calculate the metrics. FALSE means do not calculate the metrics. The default is TRUE.

sbc_ind

a logical variable indicating whether spatial balance metrics are calculated using proportions obtained from a rectangular grid superimposed on the sample points and the frame. TRUE means calculate the metrics. FALSE means do not calculate the metrics. The default is FALSE.

nrows

number of rows (and columns) for the grid of cells. The default is 5.

dxdy

indicator for equal x-coordinate and y-coordinate grid cell increments, where TRUE means the increments are equal and FALSE means the increments are not equal. The default is TRUE.

x

SpatialDesign object.

y

Missing - this argument is not used.

stratum

name of the attribute from the sfframe object that identifies stratum membership for each feature in the frame. If stratum equals NULL, the design is unstratified, and an attribute named "stratum" (with all its elements equal to the stratum name specified in design) is added to the sfframe object. The default is NULL.

mdcaty

name of the attribute from the sfframe object that identifies the unequal probability category for each feature in the survey frame. The default is NULL.

pdffile

a character variable containing the name of the pdf file to which output is written. If a value is not provided, output is written to the graphics window. The default is NULL.

width

width of the graphic region in inches. The default is 8.

height

height of the graphic region in inches. The default is 10.

Value

Object of class SpatialDesign.

A summary or plot depending on the method called.

Slots

design

Object of class list containing specifications for the survey design

data

Object of class data.frame containing the attribute data

coords.nrs

Numeric object that records the column positions in data from which the coordinates were obtained

coords

Object of class matrix containing the coordinates matrix, where points are rows in the matrix

bbox

Object of class matrix containing the bounding box

proj4string

Object of class CRS containing the projection string

Extends

Class "SpatialPointsDataFrame", directly. Class "SpatialPoints", by class "SpatialPointsDataFrame". Class "Spatial", by class "SpatialPoints".