check.names: Check fieldbook factors and variables names for potato and...

View source: R/check_names.R

check.namesR Documentation

Check fieldbook factors and variables names for potato and sweetpotato

Description

Check that fieldbook factors and variables' names correspond with the names defined in crop ontology https://cropontology.org and in the potato and sweetpotato CIP protocols.

Usage

check.names(dfr, crop = c("auto", "pt", "sp", "uk"))

Arguments

dfr

The name of the data frame.

crop

"auto" for autodetection or "pt" for potato, "sp" for sweetpotato and "uk" for unknown.

Details

The following list of factors are recognized:

  • plot: The plot number.

  • row: The row number in the field.

  • col: The columnt number in the field.

  • rep: The replication number.

  • block: The block number.

  • loc: The location name.

  • year: The year.

  • season: The season.

  • env: The environment name.

  • geno: The genotype name.

  • is_a_control: Identification variable for control checks (1 for checks and NA for test genotypes).

  • type: The genotype type (clone, entry, parent, control, etc).

  • treat: The treatment name.

Type ptont() or spont() to see the list of variables and corresponding short labels and CO numbers.

Value

It returns:

  • The fieldbook data frame with all column names in lowercase and with some possible modifications in the names.

  • A list of warnings for all the column names that have been changed.

  • A list of warnings for all the column names not recognized.

Author(s)

Raul Eyzaguirre.

Examples

check.names(potatoyield)
check.names(pjpz09)

reyzaguirre/st4gi documentation built on July 5, 2025, 6:38 a.m.