Learn R Programming

lawn (version 0.1.7)

lawn_median: Median value of a field among points within polygons

Description

Calculates the variance value of a field for a set of data-Point's within a set of data-Polygon's

Usage

lawn_median(polygons, points, in_field, out_field, lint = FALSE)

Arguments

polygons
a FeatureCollection of data-Polygon features
points
a FeatureCollection of data-Point features
in_field
(character) the field in input data to analyze
out_field
(character) the field in which to store results
lint
(logical) Lint or not. Uses geojsonhint. Takes up increasing time as the object to get linted increases in size, so probably use by default for small objects, but not for large if you know they are good geojson objects. Default: FALSE

Value

A FeatureCollection of data-Polygon features with properties listed as out_field

See Also

Other aggregations: lawn_aggregate, lawn_average, lawn_count, lawn_deviation, lawn_max, lawn_min, lawn_sum, lawn_variance

Examples

Run this code
poly <- lawn_data$polygons_average
pt <- lawn_data$points_average
lawn_median(poly, pt, 'population', 'median')

Run the code above in your browser using DataLab