strata_centroids: Partition coordinates by strata and find mean coordinates

Description Usage Arguments Value Author(s)

View source: R/strata_centroids.R

Description

This function partitions the data.frame or tibble into subgroups and returns the names and centroids of the strata.

Usage

1
2
3
strata_centroids(data, stratum = "Population", longitude = "Longitude",
  latitude = "Latitude", mode = c("data.frame", "SpatialPoints",
  "sf")[1])

Arguments

data

A data frame object with coordinates and a column to be used as stratum designations.

stratum

The name of the column to use as the partition.

longitude

The name of the column with the X-coordinate (default = Longitude)

latitude

The name of the column with the Y-coordinate (default = Latitude)

mode

The format of the returned object as a data.frame (default), spatialPoints or sf object.

Value

A data.frame object with strata and latitude and longitude

Author(s)

Rodney J. Dyer <rjdyer@vcu.edu>


dyerlab/scape documentation built on Nov. 4, 2019, 11:05 a.m.