Fit models to data from unmarked animals using Stan. Uses a similar interface to the R package 'unmarked', while providing the advantages of Bayesian inference and allowing estimation of random effects.
Hi Ken,
ubms allows spatial predictions using rasters from the raster package. The raster package is no longer being developed though and has been replaced by terra. While raster still works and is on CRAN, it carries the risk of breaking at some point in the future.
Hi Ken, ubms allows spatial predictions using rasters from the raster package. The raster package is no longer being developed though and has been replaced by terra. While raster still works and is on CRAN, it carries the risk of breaking at some point in the future.
Porting spatial predictions in ubms from raster to terra should be straightforward, replacing raster::as.data.frame() in https://github.com/kenkellner/ubms/blob/8c761fda6d69a1377997b18f65dbcc6ff2493ab5/R/predict.R#L64 with terra::as.data.frame(),
and this line: https://github.com/kenkellner/ubms/blob/8c761fda6d69a1377997b18f65dbcc6ff2493ab5/R/predict.R#L68
with out <- terra::rast(out, crs = terra::crs(inp_rast))
nb, I didn't test the code. Thank you and best regards,