export_county_files: Export data into a csv and/or rds file

View source: R/export_county_files.R

export_county_filesR Documentation

Export data into a csv and/or rds file

Description

Export data into a csv and/or rds file

Usage

export_county_files(
  dat,
  file_name = "",
  output_path = NULL,
  export_csv = TRUE,
  export_rds = TRUE,
  return_global = FALSE
)

Arguments

dat

Dataframe to be exported, e.g., output from export_county_data().

file_name

Name for the output file. Will be appended with today's date.

output_path

Path to where assembled file(s) should be exported. The default will export the csv file to the Open Data/Submissions folder on the CMAR Operations shared drive (for submission to the Open Data Portal) and the rds file to the Open Data/County Datasets folder. For custom output_path entries, the csv and rds files will be exported to the same folder.

export_csv

Logical argument indicating whether the data should be exported as a *.csv file. File name will be county_todays-date.csv. Default is TRUE. Note: TIMESTAMP is converted to a character before exporting to remove UTC formatting (2018-12-23T05:00:00Z). When re-imported into R, the UTC timezone should be added using the force_tz() function from the lubridate package.

export_rds

Logical argument indicating whether the assembled data should be exported as a *.rds file. File name will be county_todays-date.rds. Default is TRUE.

return_global

Logical argument indicating whether the assembled data should be returned to the global environment. Default is FALSE.

Value

Exports dat as a csv and/or rds file.

Author(s)

Danielle Dempsey

See Also

Other OpenData CMAR: assemble_county_data(), import_strings_data()


Centre-for-Marine-Applied-Research/strings documentation built on Aug. 21, 2023, 8 a.m.