describe("h5", {
if(requireNamespace("rhdf5")){
writeAntaresH5(pathtemp)
optsH5 <- setSimulationPath(pathtemp)
expect_true(class(.getDateRange(optsH5, "hourly")) == "Date")
expect_true(class(.getGraphFunction("ts")) == "function")
fid <- rhdf5::H5Fopen(optsH5$h5path)
expect_true(all(.getTimeStep(fid) %in% c("hourly","daily","weekly","monthly","annual")))
expect_true(length(.getElements(optsH5, "areas", fid, "hourly")$areas) == 9)
expect_true(length(.getElements(optsH5, "clusters", fid, "hourly")$clusters) == 7)
expect_true(identical(.getClustersNames(fid, "hourly"),
.getElements(optsH5, "clusters", fid, "hourly")$clusters))
expect_true(length(.getVariablesH5(fid, "hourly", "areas")$areas) == 29)
expect_true(length(.getTableInH5(fid, "hourly")) == 4)
.tryCloseH5()
}
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.