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,
  crop = c("pt", "sp"),
  label = c("standard", "CO"),
  minimal = TRUE,
  add = NULL,
  computation = FALSE
)

Arguments

design

The name of the design data frame.

crop

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

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.

Details

Only labels listed in functions ptont() and spont() 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, 'pt')
# Add additional variables
create.fb(book, 'pt', add = c('fedw', 'zndw'))
# Get the fieldbook with CO numbers
create.fb(book, 'pt', 'CO', add = c('dm', 'fedw', 'zndw'))
# Get fieldbook with minimal set of variables for sweetpotato
create.fb(book, 'sp')
# Add additional variables
create.fb(book, 'sp', add = c('bc', 'fe', 'zn'))
# Get the fieldbook with CO numbers
create.fb(book, 'sp', 'CO', add = c('bc', 'fe', 'zn'))

reyzaguirre/st4gi documentation built on March 29, 2025, 10:38 p.m.