rvn_df_to_Raven_table {RavenR} | R Documentation |
Sets up tables for writing to Raven input files
rvn_df_to_Raven_table(attributes, units, df, id_col = TRUE, parameters = FALSE)
attributes |
array of strings containing attribute/parameter names |
units |
array of strings with the corresponding units |
df |
Dataframe of values corresponding to attributes/parameters |
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) |
parameters |
bool, when adding attribues/parameter tag, should ':Parameters' be used instead of ':Attributes'? |
outdf data.frame object
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) soil_classes <- rvn_df_to_Raven_table(attributes, units, soil_classes) print(soil_classes)