Skip to contents

Opportunity to add a new column 'user_class' which enables the user to confirm or reject the automated assessment of territory areas.

Usage

user_classify(
  territory_poly,
  territory = NULL,
  possible = NULL,
  activity = NULL
)

Arguments

territory_poly

a territory polygon generated with beavertools::estimate_territories()

territory

numeric vector containing the ID numbers for areas to be reclassified as 'Territory'. e.g. c(10, 28)

possible

numeric vector containing the ID numbers for areas to be reclassified as 'Possible'

activity

numeric vector containing the ID numbers for areas to be reclassified as 'Activity'

Value

territory_poly is returned with the an additional column 'user_class'

Examples

# Here we filter the filter the built in 2019-2020 ROBT feeding sign data `RivOtter_FeedSigns`
# Then pipe this 'sf' object to forage_density.
ROBT_201920 <- RivOtter_FeedSigns %>%
dplyr::filter(SurveySeason == "2019 - 2020")%>%
  forage_density(., 'FeedCat')
#> No value supplied for "kd_extent" argument: default extent will be used
#> Error in spatialEco::sp.kde(forage_points, y = forage_points$weights,     bw = kern_bw, nr = dims$nrows[1], nc = dims$ncols[1], newdata = kd_extent,     standardize = standardise): unused arguments (nr = dims$nrows[1], nc = dims$ncols[1], newdata = kd_extent)

# Now we load the ROBT `RivOtter_OtherSigns` dataset and filter to the same
# year as the forage density raster.

CS_201920 <- RivOtter_OtherSigns %>%
dplyr::filter(SurveySeason == "2019 - 2020")

# run territory classification
otter_poly <- estimate_territories(ROBT_201920, confirm_signs = CS_201920)
#> Error in purrr::map(., ~raster::quantile(forage_raster, .)):  In index: 1.
#> Caused by error in `h()`:
#> ! error in evaluating the argument 'x' in selecting a method for function 'quantile': object 'ROBT_201920' not found

# create the map for checking automated territory classification
check_auto_terr(otter_poly, basemap=FALSE, label=TRUE)
#> Error in eval(expr, envir, enclos): object 'otter_poly' not found

user_classify(otter_poly, territory = c(10, 28))
#> Error in eval(expr, envir, enclos): object 'otter_poly' not found