Closed patch105 closed 1 year ago
The safe_raster
function is an internal package function that is saved in the utils.R
file (see GitHub repo). It applies the safely
construct to the rasterfromXYZ
function, as shown below:
safe_raster <- purrr::safely(function(x) suppressWarnings(raster::rasterFromXYZ(xyz = x)), otherwise = NULL)
Hope this helps! Phil
Ah, I missed that in the utils file! That's great, thank you.
Hi there, I'm doing some trouble-shooting with my data (checking some unexpected results) so I've been using the source code for the
compute_extrapolation
andExDet
functions. However the functionsafe_raster
from thecompute_extraplation
function is not available anywhere that I've looked. It looks to be a function just to generate rasters from the output list for univariate, analogue, and combinatorial layers but I wanted to highlight this just in case others want to use the source code.