dl_metadata: Loading metadata from xls/xlsx

View source: R/dl_data_loading_functions.R

dl_metadataR Documentation

Loading metadata from xls/xlsx

Description

dl_metadata function loads the metadata sheets from xls/xlsx file.

Usage

dl_metadata(
  file_name,
  sheet_name,
  data_type = NA,
  si_code_loc = NULL,
  parent_logger = "test"
)

Arguments

file_name

Character vector indicating the name of the xls/xlsx file containing the metadata.

sheet_name

Character vector indicating the name of the sheet to be loaded. It must be one of Data or Questionnaire.

data_type

Character vector indicating the name of the data section. It must be one of site_md, plant_md, psi_data or NA. If sheet_name is Questionnaire then data_type is not used.

si_code_loc

Name of the object containing the site metadata, in order to obtain si_code variable to include it in other metadata objects. Default to NULL, as the first metadata to load must be the site metadata.

Details

This function make use of dplyr, tidyr and readxl packages in order to retrieve and format the metadata. It's intended to be used as first step to load the metadata and start the metadata quality check.

Value

The function returns a data_frame with the corresponding metadata in "wide" format, with metadata variables as columns, ready to be feeded to quality check functions.

See Also

Other Data Loading Functions: dl_data_col_classes(), dl_get_si_code_psi(), qc_as_timestamp(), remove_dupcols()


vflo/PSIsapfluxnetQC1 documentation built on Feb. 15, 2024, 3:19 a.m.