reaggregate_shapefile: Re-aggregation of spatial polygon data by spatial...

Description Usage Arguments Value

View source: R/Spatial_Functions.R

Description

Code based on ‘sp:::aggregatePolyWeighted’ version 1.2.3 and modified to return complete information and not the area-weighted sum.

Usage

1
reaggregate_shapefile(x, by, fields = NULL, code = NULL)

Arguments

x

A sp::SpatialPolygons object from which data are extracted.

by

A sp::SpatialPolygons object. The 'extents' representing the rectangle(s) for which data are re-aggregated.

fields

A character vector. If not NULL, then fields selects columns of the extracted object.

code

A vector. If not NULL, then the extracted data are treated as integer codes of a factor whose levels are encoded by code.

Value

A list of length corresponding to the number of rectangles. Each element is a list which contains three items each

N

An integer vector. The number of unique values within the rectangle for each layer of x.

values

A list of numeric vectors or matrices. The sorted unique values as vector or matrix for each layer.

weigths

A list of numeric vectors. The weights of the values for each layer.


DrylandEcology/rSFSW2 documentation built on Aug. 18, 2020, 1:27 p.m.