formatTemplates.Rd
Convert templates in Jeanette Lyerly's format into T3/Breedbase upload templates
formatTemplates(
input_file,
output_dir,
breeding_program,
species_name,
design_type = "RCBD",
location_tab = "Location Data Form",
summary_tab = "Summary Data Form",
data_descriptors_tab = "Data_DESCRIPTORS",
trial_codes_tab = "TRIAL_CODES",
location_data_start_row = 3,
cooperator_start_row = 1,
summary_data_start_row = 8,
data_descriptors_start_row = 1,
trial_codes_start_row = 2,
trial_codes_start_col = "C",
year_codes_start_col = "E",
location_codes_start_col = "J",
trait_definitions = list(),
confirm_data = TRUE,
write_templates = TRUE,
increment_year = FALSE,
standardize_trial_names = FALSE,
trial_name_prefix = NA
)
(required) path to input excel file containing the data to format
(required) path to output directory where the accessions, location, trials, and observations templates will be saved
(required) name of breeding program to apply to all trials
(required) name of species to apply to all accessions
Trial Design Type applied to all trials (default: RCBD)
Name of tab that includes the location data (default: Location Data Form)
Name of tab that includes the summary data (default: Summary Data Form)
Name of tab that includes the trait codes and their definitions (default: Data_DESCRIPTORS)
Name of tab that includes the trial, year, and location codes (default: TRIAL_CODES)
The index of the row that has the header columns for the location data (default: 3)
The index of the row that has the cooperator info in the summary tab (default: 1)
The index of the row that has the header columns for the summary data (default: 8)
The index of the row that has the first headers for the data descriptors tables (default: 1)
The index of the row that has the headers for the trial codes table (default: 2)
The index of the col that has the values for the trial codes table (default: C)
The index of the col that has the values for the year codes table (default: E)
The index of the col that has the values for the location codes table (default: J)
Additional trait definitions (this should be a list where the key is the name of the trait in the input data and the value is the trait header used in the breedbase template)
Flag to print input data and have user confirm it is parsed correctly (default: TRUE)
Flag to have the function generate output templates (default: TRUE)
Flag to increment the year defined in the trial (used for winter crops where the input data is using the planting year as the year and we want to use the harvest year as the year) (default: FALSE)
Flag to generate standardized trial names in the format (PREFIX_YEAR_LOCATION) (Default: False, will use the Trial column in the input data)
When standardize_trial_names is set to True, this will be the prefix used in the generated trial names