taudem_exec {traudem} | R Documentation |
Call TauDEM
taudem_exec(
program,
args,
...,
n_processes = getOption("traudem.n_processes", 1),
quiet = getOption("traudem.quiet", FALSE)
)
program |
TauDEM command (character). See examples. |
args |
Character vector of arguments. See examples. |
... |
These dots are for future extensions and must be empty. As a consequence, all following arguments must be fully named (see examples). |
n_processes |
Number of processes for |
quiet |
If |
You can use this function to call more TauDEM methods than the ones with dedicated wrappers in this package. Please refer to the relative TauDEM function documentation for the syntax used to specify optional arguments. See also examples.
TRUE
if the call was successful, FALSE
otherwise.
test_dir <- withr::local_tempdir()
dir.create(test_dir)
file.copy(
system.file("test-data", "DEM.tif", package = "traudem"),
file.path(test_dir, "DEM.tif")
)
# Default name for output file, only input command and input filename.
taudem_exec("pitremove", file.path(test_dir, "DEM.tif"))
# syntax for user-attributed output file name
taudem_exec(
"pitremove",
c(
"-z", file.path(test_dir, "DEM.tif"),
"-fel", file.path(test_dir,"filled_pits.tif")
)
)