Learn R Programming

bcmaps (version 1.2.0)

get_poly_attribute: Get or calculate the attribute of a list-column containing nested dataframes.

Description

[Deprecated]

This function is deprecated as of bcmaps 1.2.0 because it had a very niche application for calculating attributes on a SpatialPolygonsDataFrame, which we are removing support for. It will be removed completely in Summer 2023.

For example, self_union produces a SpatialPolygonsDataFrame that has a column called union_df, which contains a data.frame for each polygon with the attributes from the constituent polygons.

Usage

get_poly_attribute(x, col, fun, ...)

Value

An atomic vector of the same length as x

Arguments

x

the list-column in the (SpatialPolygons)DataFrame that contains nested data.frames

col

the column in the nested data frames from which to retrieve/calculate attributes

fun

function to determine the resulting single attribute from overlapping polygons

...

other parameters passed on to fun