Learn R Programming

DSSAT (version 0.0.9)

add_v_fmt: Adds variable format information to a tibble

Description

Adds variable format information to a tibble

Usage

add_v_fmt(input_tbl, v_fmt = NULL)

Value

a tibble containing the original tibble with an additional attribute that contains variable format information

Arguments

input_tbl

a tibble

v_fmt

a named vector containing variable format information to be added to `input_tbl`

Examples

Run this code

# Extract file path for sample ecotype file
sample_eco_file <- system.file('extdata','SAMPLE.ECO',package='DSSAT')

# Read sample ecotype file
eco <- read_eco(sample_eco_file)

# Replace formats for TSEN and CDAY parameters
eco <- add_v_fmt(eco,v_fmt=c(TSEN='%6.1f',CDAY='%6.1f'))

Run the code above in your browser using DataLab