dwp.Rd
The dwp
function will create the table with Density Weighted
Probability required to run genest
.
dwp(vr, pt)
vr | a shapefile describing the visibility for each turbine at each ring.
Ideally should be obtained with |
---|---|
pt | a shapefile with carcass positions with an unique ID for each one. |
a data.frame with dwp for each turbine at each ring distance.
DWP will be obtained for a single group. Ensure that pt is a vector with the group size you are interested in.
if (FALSE) { 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() }