importRDBESDataCSV: Create an RDBES Raw Object

View source: R/importRDBESDataCSV.R

importRDBESDataCSVR Documentation

Create an RDBES Raw Object

Description

Create an R object from a folder containing .csv data files downloaded from the RDBES upload/download page.

Usage

importRDBESDataCSV(
  rdbesExtractPath = NULL,
  listOfFileNames = NULL,
  castToCorrectDataTypes = TRUE
)

Arguments

rdbesExtractPath

(Optional) The path to the csv files produced as an extract by the ICES RDBES. If no path is suppled then an empty RDBESDataObject will be returned.

listOfFileNames

(Optional) A named list of file names - the list names shoudl be the two-letter code for the relevent table e.g. list("DE" = "DE.csv",... ). If the parameter is not supplied then the default file names used by the RDBES data download will be used e.g. "Design.csv" etc.

castToCorrectDataTypes

(Optional) If TRUE then the function will attempt to cast the required columns to the correct data type. If FALSE then the column data types will be determined by how the csv files are read in. The default is TRUE

Value

A RDBESDataObject. If a path to RDBES extract files is provided then it will contain the data from those files. If no path is supplied then an empty RDBESDataObject will be returned.

Examples

## Not run: 
myEmptyRDBESObject <- importRDBESDataCSV()
rdbesExtractPath <- "./tests/testthat/h7_v_1_19_18/"
obj <- importRDBESDataCSV(rdbesExtractPath)

## End(Not run)

ices-tools-dev/icesRDBES documentation built on April 17, 2025, 1:58 p.m.