write_meta: Write metadata to the disk.

View source: R/write_meta.R

write_metaR Documentation

Write metadata to the disk.

Description

Write metadata to the disk.

Usage

write_meta(
  meta,
  dir = getwd(),
  file_out = "atlantisom_log.txt",
  verbose = FALSE
)

Arguments

meta

A list of metadata as read in by load_meta.

dir

The directory of the atlantis model output, where the default is getwd().

file_out

A character value specifying a file name to write output to. If the function takes the argument dir, then the file will be written to file.path(dir, file_out). If the argument dir is not included in the function then the file will be written to the current directory or one can specify a full path name. The default will depend on the function and if is.null(file_out) then no file will be written.

verbose

A logical value specifying if output should be written to the screen or not. The default value is FALSE.

Value

Write a file to the disk of metadata pertaining to a single Atlantis scenario.

Author(s)

Kelli Faye Johnson

See Also

load_meta

Examples

d <- system.file("extdata", "SETAS_Example", package = "atlantisom")
meta <- load_meta(d, "outputs")
write_meta(meta, dir = NULL, "test.txt")
unlink("test.txt")
rm(meta)


r4atlantis/atlantisom documentation built on Nov. 12, 2023, 2:59 a.m.