Learn R Programming

pedometrics (version 0.6-3)

coordenadas: Prepare object for argument design of spsurvey.analysis()

Description

This function returns an object to feed the argument design when creating an object of class spsurvey.analysis.

Usage

coordenadas(x)

Arguments

x
Object of class SpatialPointsDataFrame from which site ID and XY coordinates are to be returned.

Value

  • An object of class data.frame containing three columns with names siteID, xcoord, and ycoord.

Details

The argument design used to create object of class spsurvey.analysis requires a series of inputs. However, it can be fed with data about site ID and coordinates. coordenadas() returns a data frame that provides this information, assuming that all other design variables are provided manualy in the arguments list.

References

Kincaid, T. M. and Olsen, A. R. (2013). spsurvey: Spatial Survey Design and Analysis. R package version 2.6. URL: <http://www.epa.gov/nheerl/arm/>.

See Also

gcpDiff, cont.analysis.

Examples

Run this code
## Create an spsurvey.analysis object
my.spsurvey <-
  spsurvey.analysis(design = coordenadas(my.data),
                    data.cont = delta(ref.data, my.data),
                    popcorrect = TRUE, pcfsize = length(my.data$id),
                    support = rep(1, length(my.data$id)),
                    wgt = rep(1, length(my.data$id)), vartype = "SRS")

Run the code above in your browser using DataLab