Creating UDStack objects
UDStack.Rd
The function enables the easy generation of .UDStacks, which is for example useful for using other UD function such as getVolumeUD.
Value
An UDStack object
Examples
data(dbbmmstack)
stk<-as(dbbmmstack,"RasterStack")
UDStack(stk)
#> class : .UDStack
#> dimensions : 45, 21, 945, 2 (nrow, ncol, ncell, nlayers)
#> resolution : 617.1116, 617.1116 (x, y)
#> extent : -6478.702, 6480.641, -13884.56, 13885.46 (xmin, xmax, ymin, ymax)
#> crs : Error in if (is.na(x)) { : argument is of length zero
#>
#> names : Leroy, Ricky.T
#> min values : 0, 0
#> max values : 0.08993285, 0.71508072
#>
lst<-split(dbbmmstack)
UDStack(lst)
#> class : .UDStack
#> dimensions : 45, 21, 945, 2 (nrow, ncol, ncell, nlayers)
#> resolution : 617.1116, 617.1116 (x, y)
#> extent : -6478.702, 6480.641, -13884.56, 13885.46 (xmin, xmax, ymin, ymax)
#> crs : +proj=aeqd +lat_0=42.778423 +lon_0=-73.8871629 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs
#> names : Leroy, Ricky.T
#> min values : 0, 0
#> max values : 0.08993285, 0.71508072
#>
## transforming a DBBMMBurstStack into UDStack, e.g. to than
## use the "getVolumeUD" or "emd" function
data(leroy)
leroyB <- burst(x=leroy,f=c(rep(c("Behav.1","Behav.2"),each=400),rep("Behav.1", 118)))
leroyBdbb <- brownian.bridge.dyn(object=spTransform(leroyB[785:820], center=TRUE),
location.error=12, dimSize=115, ext=.45,
time.step=25/15, margin=15)
#> Computational size: 8.3e+04
#> Computational size: 3.3e+05
cellStats(leroyBdbb, sum)
#> Behav.2 Behav.1
#> 0.2000882 0.7999118
leroyBud <- UDStack(leroyBdbb)
cellStats(leroyBud, sum)
#> Behav.2 Behav.1
#> 1 1