# NOT RUN {
data(deer)
data(sh_forest)
mini_deer <- deer[1:20, ]
mini_deer %>% extract_covariates(sh_forest)
mini_deer %>% steps %>% extract_covariates(sh_forest)
mini_deer %>% steps %>% extract_covariates(sh_forest, where = "start")
# }
# NOT RUN {
# Illustration of extracting covariates along the a step
mini_deer %>% steps() %>% random_steps() %>%
extract_covariates(sh_forest) %>% # extract at the endpoint
mutate(for_path = extract_covariates_along(., sh_forest)) %>%
# 1 = forest, lets calc the fraction of forest along the path
mutate(for_per = purrr::map_dbl(for_path, ~ mean(. == 1)))
# }
Run the code above in your browser using DataLab