hr_to_sf: Convert

Description Usage Arguments Value Examples

View source: R/hr_to_sf.R

Description

Convert

Usage

1
2
3
4
hr_to_sf(x, ...)

## S3 method for class 'tbl_df'
hr_to_sf(x, col, ...)

Arguments

x

A tibble with a list column with individual home ranges.

...

Additional columns that should be transferred to the new tible.

col

The column where the home

Value

A data.frame with a simple feature column (from the sf) package.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
data("amt_fisher")
hr <- amt_fisher %>% nest(data = -id) %>%
  mutate(hr = map(data, hr_mcp), n = map_int(data, nrow)) %>%
  hr_to_sf(hr, id, n)

hr <- amt_fisher %>% nest(data = -id) %>%
  mutate(hr = map(data, hr_kde), n = map_int(data, nrow)) %>%
  hr_to_sf(hr, id, n)


## Not run: 
ggplot(hr) + geom_sf()


## End(Not run)

amt documentation built on Jan. 18, 2021, 5:05 p.m.