add_v_fmt: Adds variable format information to a tibble

View source: R/add_v_fmt.R

add_v_fmtR Documentation

Adds variable format information to a tibble

Description

Adds variable format information to a tibble

Usage

add_v_fmt(input_tbl, v_fmt = NULL)

Arguments

input_tbl

a tibble

v_fmt

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

Value

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

Examples


# 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'))


DSSAT documentation built on Nov. 9, 2023, 1:08 a.m.