Save inputted data out to a data file if requested and return it to the console, invisible-ly..

write_data(
  x = NULL,
  main = ".",
  data_sub = "data",
  save = TRUE,
  filename = NULL,
  overwrite = TRUE,
  quiet = FALSE
)

Arguments

x

data.frame or YAML list to be written out.

main

character value of the name of the main component of the directory tree.

data_sub

character value defining the data subdirectory of the portalcasting directory tree.

save

logical indicator controlling if x should be saved out.

filename

character name of the file for saving x.

overwrite

logical indicator of if the file should be overwritten if it exists.

quiet

logical indicator if messages should be quieted.

Value

x as input, invisible-ly.