Learn R Programming

DSSAT (version 0.0.9)

write_tier: Writes data from a single DSSAT data tier

Description

Writes data from a single DSSAT data tier

Usage

write_tier(
  tier_data,
  pad_name = NULL,
  drop_duplicate_rows = FALSE,
  drop_na_rows = TRUE
)

Value

a character vector

Arguments

tier_data

a tibble containing the data to write out

pad_name

a character vector of column names for which to add leading spaces/trailing periods

drop_duplicate_rows

a logical value indicating whether duplicate rows should be dropped from tier_data

drop_na_rows

a logical value indicating whether rows containing all NA values should be dropped from tier_data

Examples

Run this code

tier_data <- data.frame(TRNO=1:4,HWAM=rnorm(4,2000,250))

tier_data <- add_v_fmt(tier_data,v_fmt=c(TRNO='%6.0f', HWAM='%6.0f'))

output <- write_tier(tier_data)

Run the code above in your browser using DataLab