rvn_write_Raven_table {RavenR} | R Documentation |
Writes a nicely formatted tables of Raven attributes/parameters
rvn_write_Raven_table( attributes, units, df, filename, id_col = TRUE, justify = "right", sep = ", ", ... )
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 |
True/False of whether an numeric id column is the first column in the table and, in common Raven fashion, does not have a corresponding attribute (default: True) |
justify |
alignment of character columns (default 'right'). See |
sep |
character(s) used to seperate columns (default ', ') |
... |
Extra arguments for |
TRUE returns TRUE if executed successfully
Leland Scantlebury, leland@scantle.com
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)