validate_colnames: Validate column names against codebook

View source: R/validate_colnames.R

validate_colnamesR Documentation

Validate column names against codebook

Description

Validate column names against codebook

Usage

validate_colnames(
  df,
  codebook_name,
  db_folder,
  crop_types = NULL,
  cb_name_remove = NULL
)

Arguments

df

A data.frame with column names to verify against the codebook names against e.g. "trial_data", "trials_metadata"

codebook_name

A string denoting the book name. Use list_db_books() to see options

db_folder

A string path to the database controlled vocabulary folder

crop_types

A vector containing the crop_types. This is used to select the appropriate traits if codebook_name == "trial_data"

cb_name_remove

A string denoting the name of the codebook to remove from the data (df) For example, if testing "trial_data", remove the names in df that correspond to "trials_metadata"

See Also

Other validation functions: confront_data(), create_rules(), find_col_info()


IdahoAgStats/factcuratoR documentation built on Nov. 15, 2024, 11:11 a.m.