Description Usage Arguments Value Examples
extract data from array into a dataframe for selected locations and substances,
| 1 | arr2df(arr, locmod, submod)
 | 
| arr | the array to be extracted. | 
| locmod | the locations in the array to be extracted | 
| submod | the substances in the array to be extracted | 
A dataframe with model output values for submod and locmod.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 | library(DelwaqR)
arr <- his2arr(filename = "extdata/NZBLOOM.his", timestamp = F, begintime = "2003-01-01 00:00:00")
dimnames(arr)
submod <- c("Chlfa", "OXY")
locmod <- c("NZR6NW020", "NZR9TS010")
df <- arr2df(arr, locmod=locmod, submod=submod)
df$value[df$variable == "fResptot"] <- -df$value[df$variable == "fResptot"]
library(ggplot2)
plot <- ggplot(df, aes(time, value))
plot +
  geom_line(aes(color = variable), size = 1) +
  geom_point(aes(color = variable), fill = "white",  shape = 21, size = 4) +
  facet_grid((. ~ location))
 | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.