create.fb: Create potato and sweetpotato fieldbook

View source: R/create_fb.R

create.fbR Documentation

Create potato and sweetpotato fieldbook

Description

Creates a potato and sweetpotato fieldbook with short labels or CO numbers.

Usage

create.fb(
  design,
  label = c("standard", "CO"),
  minimal = TRUE,
  add = NULL,
  computation = FALSE,
  crop = c("pt", "sp")
)

Arguments

design

The name of the design data frame.

label

Use standard for standard sweetpotato short labels or CO for CO numbers. Default is standard.

minimal

Logical, if TRUE, a minimal list of variables is included. Default is TRUE.

add

Additional variables to include. Only if minimal = TRUE.

computation

Logical, if TRUE, computed variables are included. Only if minimal = FALSE. Default is FALSE.

crop

"pt" for potato and "sp" for sweetpotato.

Details

Only labels listed in function check.names are valid. Uppercase labels are converted to lowercase.

Value

It returns a data frame with fieldbook design and variables.

Author(s)

Raul Eyzaguirre.

Examples

book <- cr.rcbd(1:20, 3, 10)$book
# Get fieldbook with minimal set of variables for potato
create.fb(book, crop = 'pt')
# Add additional variables
create.fb(book, add = c('fedw', 'zndw'), crop = 'pt')
# Get the fieldbook with CO numbers
create.fb(book, label = 'CO', add = c('dm', 'fedw', 'zndw'), crop = 'pt')
# Get fieldbook with minimal set of variables for sweetpotato
create.fb(book, crop = 'sp')
# Add additional variables
create.fb(book, add = c('bc', 'fe', 'zn'), crop = 'sp')
# Get the fieldbook with CO numbers
create.fb(book, label = 'CO', add = c('bc', 'fe', 'zn'), crop = 'sp')

reyzaguirre/st4gi documentation built on Sept. 25, 2024, 6:33 p.m.