Description Usage Arguments Value Examples
View source: R/extract_from_swatday.R
Extract variables from swatday.asc data.tables and organize layer-wise values in columns
1 | extract_from_swatday.asc(dat, layers = NULL, vars = NULL)
|
dat |
swatday.asc data.table as returned from |
layers |
integer vector addressing the layer numbers (nl) to be extracted from dat. If not supplied, values from all layers will be returned |
vars |
character vector containing variable names (out of "swati","theta", "wetnes","psimi","psiti" to be extracted from dat. If not supplied all 5 variables will be returned. |
a data.table with the layers' daily values of the variables organized in columns (wide format) with the names being made up of the variable name and layer number.
1 2 3 4 5 6 7 8 9 10 11 12 | # Read files from LWF-Brook90 output directory
output <- readOutput.B90("tests/out/")
# Reorganize all variables for all layers
swati_wide <- extract_from_swatday.asc(output$swatday.asc)
# select single variables and layers:
swati_wide <- extract_from_swatday.asc(output$swatday.asc,
layers =1:10,
vars = c("swat", "psim", "theta"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.