Exports a raster or SpatRaster to text format such as .txt
to stick to original file formats of legacy MHM/CMP softwares.
Arguments
- x
rasterorSpatRaster- filename
where to write the file
- ...
additional arguments to pass to utils::write.table
- signif
how many significant numbers to retain (default to
NULL, no rounding)
Examples
# we don't run the export here to not mess CRAN/github
# if you do, this will write a file on your machine
if (FALSE) { # \dontrun{
landscape <- import_example("l1.tif")
landscape %>% export_txt("landscape.txt")
} # }
