dwp: DWP

Description Usage Arguments Details Value Author(s) Examples

View source: R/dwp.R

Description

The dwp function will create the table with Density Weighted Probability required to run genest.

Usage

1
dwp(vr, pt)

Arguments

vr

a shapefile describing the visibility for each turbine at each ring. Ideally should be obtained with virings.

pt

a shapefile with carcass positions with an unique ID for each one.

Details

DWP will be obtained for a single group. Ensure that pt is a vector with the group size you are interested in.

Value

a data.frame with dwp for each turbine at each ring distance.

Author(s)

Paulo E. Cardoso

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
## Not run: 
require(genestdwp)
require(units)
# Vector of distances
dist = c(10, 20, 30, 40, 50)

# Spatial join among visibility map and rings
rings <- viring(x = visib, d = dist)

# Carcasses
pto_carcass
unique(pto_carcass$tamanho)

# Get DWP
dfdwp <- dwp(vr = rings, pt = pto_carcass)
dfdwp

# Plot some data together
ggplot() +
  geom_sf(aes(fill = as.numeric(dist)), colour = 'black',
          size = .8, data = filter(rings, ag == 1)) +
  geom_sf(data = filter(pto_carcass, ag == 1)) +
  theme_void()

## End(Not run)

PauloEduardoCardoso/genestdwp documentation built on April 9, 2020, 3:40 p.m.