readin_db: Read in all codebooks and create a combined cultivar file

View source: R/access_controlled_vocab.R

readin_dbR Documentation

Read in all codebooks and create a combined cultivar file

Description

Read in all controlled variable codebooks and create a combined cultivar file in long format.

Usage

readin_db(db_folder)

readin.db(db_folder)

Arguments

db_folder

A string path to the database controlled vocabulary folder

Value

A list of data frames; *.csv files in the controlled vocab folder.

Additionally creates a combined cultivar file, cultivar.csv, selecting crop, date_added, and all current variety/alias names for each crop_type. All variety/alias names are gathered in a single column, linked with a db_id number. The type_db column tracks whether the name is an alias or true variety name, and the intid_db column contains the cultivar name in lowercase with all spaces and punctuation removed, used for matching.

See Also

Other access codebook functions: get_col_index(), get_variety_db(), list_db_books(), list_db_var()


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