The write_output
function is a generic wrapper to writing any
output files (e.g. projections) created with the ibis.iSDM-package
. It is
possible to write outputs of fitted DistributionModel
,
BiodiversityScenario
or individual terra
or stars
objects. In
case a data.frame
is supplied, the output is written as csv file.
For creating summaries of distribution and scenario parameters and performance,
see write_summary()
Usage
write_output(
mod,
fname,
dt = "FLT4S",
verbose = getOption("ibis.setupmessages", default = TRUE),
...
)
# S4 method for class 'ANY,character'
write_output(
mod,
fname,
dt = "FLT4S",
verbose = getOption("ibis.setupmessages", default = TRUE),
...
)
# S4 method for class 'BiodiversityScenario,character'
write_output(
mod,
fname,
dt = "FLT4S",
verbose = getOption("ibis.setupmessages", default = TRUE),
...
)
# S4 method for class 'SpatRaster,character'
write_output(
mod,
fname,
dt = "FLT4S",
verbose = getOption("ibis.setupmessages", default = TRUE),
...
)
# S4 method for class 'data.frame,character'
write_output(
mod,
fname,
dt = "FLT4S",
verbose = getOption("ibis.setupmessages", default = TRUE),
...
)
# S4 method for class 'stars,character'
write_output(
mod,
fname,
dt = "FLT4S",
verbose = getOption("ibis.setupmessages", default = TRUE),
...
)
Arguments
- mod
Provided
DistributionModel
,BiodiversityScenario
,terra
orstars
object.- fname
A
character
depicting an output filename.- dt
A
character
for the output datatype. Following theterra::writeRaster
options (Default:'FLT4S'
).- verbose
logical
indicating whether messages should be shown. OverwritesgetOption("ibis.setupmessages")
(Default:TRUE
).- ...
Any other arguments passed on the individual functions.
Examples
if (FALSE) { # \dontrun{
x <- distribution(background) |>
add_biodiversity_poipo(virtual_points, field_occurrence = 'observed', name = 'Virtual points') |>
add_predictors(pred_current, transform = 'scale',derivates = 'none') |>
engine_xgboost(nrounds = 2000) |> train(varsel = FALSE, only_linear = TRUE)
write_output(x, "testmodel.tif")
} # }