rvn_write_Raven_table {RavenR} | R Documentation |
Writes a nicely formatted tables of Raven attributes/parameters
Description
Writes a nicely formatted tables of Raven attributes/parameters
Usage
rvn_write_Raven_table(
attributes,
units,
df,
filename,
id_col = TRUE,
justify = "right",
sep = ", ",
...
)
Arguments
attributes |
array of strings containing attribute/parameter names |
units |
array of strings with the corresponding units |
df |
Dataframe of values corresponding to attributes/parameters |
filename |
Name of the file, with extension, to append the table to |
id_col |
|
justify |
alignment of character columns (default 'right'). See |
sep |
character(s) used to seperate columns (default ', ') |
... |
Extra arguments for |
Value
TRUE |
returns |
Author(s)
Leland Scantlebury, leland@scantle.com
Examples
soil_classes <- data.frame('Attributes' = c('DEFAULT','ALTERNATIVE'),
'SAND' = c(0.4316, 0.3000),
'CLAY' = c(0.1684, 0.4000),
'SILT' = c(0.4000, 0.3000),
'ORGANIC' = c(0.0000, 0.0000))
attributes <- c('%SAND','%CLAY','%SILT','%ORGANIC')
units <- rep('none',4)
tf <- file.path(tempdir(), "Hogwarts.rvp")
rvn_write_Raven_table(tf, attributes = attributes, units = units, df = soil_classes)
# view file
readLines(tf)
[Package RavenR version 2.2.2 Index]