check.numeric: Check fieldbook variables are numeric

View source: R/check_numeric.R

check.numericR Documentation

Check fieldbook variables are numeric

Description

Check that fieldbook variables are stored as numeric.

Usage

check.numeric(dfr, crop = c("auto", "pt", "sp"), add = NULL)

Arguments

dfr

The name of the data frame.

crop

"auto" for autodetection or "pt" for potato and "sp" for sweetpotato.

add

Additional quantitative variables.

Details

It checks that all variables recognized by check.names are stored as numeric. Non-numeric columns are transformed to numeric and the NAs values introduced by coercion are listed.

Value

It returns the data frame with all non-numeric variables transformed to numeric, and a list of all NAs values introduced by coercion.

Author(s)

Raul Eyzaguirre.

Examples

tmp <- check.names(potatoyield)
check.numeric(tmp)
tmp <- check.names(pjpz09)
check.numeric(tmp)

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