Create table and file to add trials to T3
create_trials_T3.Rd
Create table and file to add trials to T3
Usage
create_trials_T3(
dat = NULL,
checkDB = TRUE,
p2f = NULL,
return_table = TRUE,
location_state_corresp = NULL,
keepID = NULL,
year = NULL,
location = NULL,
accession_name = NULL,
transplanting_date = NA,
plot_number = NA,
planting_date = NA,
harvest_date = NA,
block_number = NA,
is_a_control = NA,
rep_number = NA,
range_number = NA,
row_number = NA,
col_number = NA,
plot_width = NA,
plot_length = NA,
field_size = NA,
seedlot_name = NA,
num_seed_per_plot = NA,
weight_gram_seed_per_plot = NA,
prefix_BP = "URSN",
is_private = NA,
design_type = "RCBD",
trial_type = "phenotyping_trial",
description = "Cooperative nursery of scab trials",
breeding_program = "Regional Scab Nursery Cooperative"
)
Arguments
- dat
data frame with trial information
- checkDB
logical, whether to check the T3 database with
BrAPI
package to exclude trials already in the database, default is TRUE.- p2f
path to file (with xlsx extension) to write the output of the function
- return_table
logical, whether to return the table or not, default is TRUE.
- location_state_corresp
list, a named list with the correspondence between state (or Canadian province) and location, default is NULL. If not provided, a default list is used.
- keepID
character string, ID column to keep in the table (returned not exported)
- year
character string, name of the column in
dat
that contains the year, mandatory.- location
character string, name of the column in
dat
that contains the location, mandatory.- accession_name
character string, name of the column in
dat
that contains the accession name, mandatory.- transplanting_date
character string, name of the column in
dat
that contains the transplanting date.- plot_number
character string, name of the column in
dat
that contains the plot number. If not present, increasing number from 1000.- planting_date
character string, name of the column in
dat
that contains the planting date.- harvest_date
character string, name of the column in
dat
that contains the harvest date.- block_number
character string, name of the column in
dat
that contains the block number, if not present, filled with 1.- is_a_control
character string, name of the column in
dat
that contains the control status, filled with 0/1.- rep_number
character string, name of the column in
dat
that contains the rep number, if not present, filled with 1.- range_number
character string, name of the column in
dat
that contains the range number.- row_number
character string, name of the column in
dat
that contains the row number.- col_number
character string, name of the column in
dat
that contains the column number.- plot_width
character string, name of the column in
dat
that contains the plot width in meters.- plot_length
character string, name of the column in
dat
that contains the plot length in meters.- field_size
character string, name of the column in
dat
that contains the field size.- seedlot_name
character string, name of the column in
dat
that contains the seedlot name.- num_seed_per_plot
character string, name of the column in
dat
that contains the number of seed per plot.- weight_gram_seed_per_plot
character string, name of the column in
dat
that contains the weight of seed per plot in grams.- prefix_BP
character string, prefix for the breeding program, default is "URSN".
- is_private
character string, name of the column in
dat
that contains the private status, set as 1 if private.- design_type
character string, name of the column in
dat
that contains the design type, default is "RCBD".- trial_type
character string, name of the column in
dat
that contains the trial type, default is "phenotyping_trial".- description
character string, name of the column in
dat
that contains the description of the trial, default is "Cooperative nursery of scab trials".- breeding_program
character string, name of the column in
dat
that contains the breeding program, default is "Regional Scab Nursery Cooperative".
Value
a data frame with the trials to add to T3 if return_table is TRUE, otherwise a file is written to the path p2f