
Save the data tables pulled from an Access database as .csv files
Source:R/saveFiles.R
saveRelationalTables.Rd
Save the data tables pulled from an Access database as .csv files
Arguments
- relationalTables
A list of the relational tables, ideally taken from
bridgeAccess
.- folderPath
Path to the folder where the csv files will be saved.
- fileNames
A vector of file names (not file path). If
NULL
, will pull the names from the providedrelationalTables
argument. Defaults toNULL
Value
Each table will be written. A metadata table will be returned indicating success of the file writes.
Details
This is a simple wrapper function that will save the relational tables pulled from an Access database. The function was developed specifically for the surveys within the Native Fish Program from CDFW, requiring the UTF-8 encoding.
Examples
if (FALSE) { # \dontrun{
slsTables <- bridgeAccess("https://filelib.wildlife.ca.gov/Public/Delta%20Smelt/SLS.zip",
tables = c("Catch", "FishCodes"))
# Saving to the temporary directory
saveRelationalTables(slsTables, folderPath = tempdir())
} # }