lawn_filter: Filter a FeatureCollection by a given property and value

Description Usage Arguments Value See Also Examples

View source: R/filter.R

Description

Filter a FeatureCollection by a given property and value

Usage

1
lawn_filter(features, key, value, lint = FALSE)

Arguments

features

A data-FeatureCollection

key

(character) The property on which to filter.

value

(character) The value of that property on which to filter.

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

S filtered data-FeatureCollection with only features that match input key and value.

See Also

Other data functions: lawn_featurecollection(), lawn_feature(), lawn_geometrycollection(), lawn_linestring(), lawn_multilinestring(), lawn_multipoint(), lawn_multipolygon(), lawn_point(), lawn_polygon(), lawn_random(), lawn_remove(), lawn_sample()

Examples

1
2
3
4
5
cat(lawn_data$filter_features)
lawn_filter(features = lawn_data$filter_features, key = 'species',
  value = 'oak')
lawn_filter(lawn_data$filter_features, 'species', 'maple')
lawn_filter(lawn_data$filter_features, 'species', 'redwood')

lawn documentation built on Jan. 6, 2021, 5:07 p.m.