# script that shows a dataframe of all VLP models used over time # build the dataset name, get the VLP model name library(dplyr) # get a listing of HDF5 objects hFile <- "./data/WOODLIB.02.hdf5" my.var <- "vlp.model" df <- h5ls(hFile) # get a vector of those datasets named "vlp.model" df2 <- df %>% filter(name == my.var) %>% select(group) v2 <- df2$group v3 <- paste(v2, my.var, sep = "/") # create dataframe for final output df.vlp <- data.frame(model = sapply(v3, function(x) h5read(hFile, x))) df.vlp H5close()
# get all the objects df <- h5ls("./data/WOODLIB.01.hdf5") df H5close()
# get a vector of those datasets named "vlp.model" library(dplyr) my.var <- "vlp.model" df2 <- df %>% filter(name == my.var) %>% select(group) v2 <- df2$group v2
# test joining group paths ds.name <- paste(v2[1], my.var, sep = "/") h5read("./data/WOODLIB.01.hdf5", ds.name)
# vector joining of group paths and get values of vlp.model with sapply v3 <- paste(v2, my.var, sep = "/") sapply(v3, function(x) h5read("./data/WOODLIB.01.hdf5", x)) H5close()
# get a vector of run date plus the model variable v3 <- paste(v2, my.var, sep = "/") v3
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.