Write data to a CENTURY site file.
write_site.Rd
write_site
allows users to create input site files (extension '.100') for the CENTURY soil model.
Usage
write_site(
x,
pathname = pathname,
filename = filename,
ndigits = 6,
sep = " ",
overwrite = FALSE
)
Arguments
- x
list
with as many elements as events as needed.- pathname
character
string with valid path to a folder.- filename
character
string specifying the name of the file, which must include the extension '.100'.- overwrite
logical
, if set to FALSE (default), the code will stop if file already exists. If set to TRUE, the previous file will be overwritten.
Examples
# Reads one of the site files provided with the package.
pathname <- system.file("extdata/4.forest", package = "Rcentury")
filename <- "duke.100"
x <- read_site(pathname, filename)
# Create temporary path.
path <- tempdir()
write_site(x, path, "duke.100")