get_expected_columns() looks up the column names and order expected at
different points in the data pipeline. The columns themselves are
set in the expected_columns list object.
Usage
get_expected_columns(type, existing = character(0))Arguments
- type
What type (point along the data pipeline) are the names for, currently one of
calibratedoutput fromimport_calibrated_data()intermediateintermediate in QC process this includes the individual flag columnsqc_finaloutput fromqc_deployment()final_allcomplete set of columns in final files, used for archive result filefinal_WPPcolumns in the WPP result filefinal_corecolumns in the core result filefinal_sensorscolumns representing sensors WPP result file; may be set to "DR"tide_riderTide Rider csv columns after dropping parenthesis and their contents, e.g. "(m)", and trimming leading and trailing spaces. when rejected in QC
- existing
A vector of existing column names. This is used to determine which of the optional column names are present
Value
A list of the expected names (including only the optional names that are present) in canonical order.
Details
At each step in the process there are both required and optional names this function handles the fuzziness between those two - returning a final set of column names, in canonical order.
This function uses lists of column names defined separately in
R/expected_column_names.R. Edit that list to change the output.
Note that there are no optional names for the four final_* result files.