write_har: Write an R list to GEMPACK HAR

View source: R/write_har.R

write_harR Documentation

Write an R list to GEMPACK HAR

Description

This function writes a HAR file based on a list. If a list element contains attribute "description," then it is used to define the long header name

Some warnings: (1) you cannot have NA's in a HAR file, (2) empty strings are not allowed, (3) some programs (e.g., GEMPACK models) read chunks of data no longer than 1e4 bytes (set maxSize = 1e4), (4) all dimensions in arrays must have names (see example)

Usage

write_har(data, filename, maxSize = 10000)

Arguments

data

A list

Examples

myList = list(TEST = c('Test'))
attr(myList$TEST,'description') = "This is the long header name"
write_har(myList,'harfile.har')

USDA-ERS/MTED-HARr documentation built on March 24, 2024, 5:19 p.m.