Reduce data frame to a single spatial reliability within a context
Source:R/reduce_geo_rel.R
reduce_geo_rel.Rd
Reduce data frame to a single spatial reliability within a context
Usage
reduce_geo_rel(
df,
dist_col = "rel_metres",
dist_min = 100,
dist_max = 250,
context,
extra_cols = "taxa",
over_ride_na = NULL,
over_ride_metres = NULL
)
Arguments
- df
Dataframe.
- dist_col
Character. Name of the column containing the spatial reliability.
- dist_min
Numeric. In the same units as
dist_col
. The target spatial reliability that will be filtered on later.- dist_max
Numeric. In the same units as
dist_col
. In some cases, there is good reason to believe thatdist_col
is an under estimate of spatial reliability. These cases are identified byover_ride_metres
where those instances havedist_col <= dist_max
. In those cases,dist_col_adj
will containdist_min
rather thandist_col
. Only needed ifover_ride_metres
is used- context
Character. column names defining the context.
- extra_cols
Character. Extra columns added to context.
- over_ride_na
Named list. List names must be the same as column names. Any names in
over_ride_na
will be matched to column names indf
and any values in that list element will be given the valuedist_min
. This is mainly used to prevent filtering data sources that do not have a concept equivalent torel_metres
.- over_ride_metres
Named list. List names must be the same as column names. Any names in
over_ride_metres
will be matched to column names indf
and any values in that list element will be given the valuedist_min
.