This package depends on rhdf5 package. This is a bioconductor package. Morevover, the current version need the last R version (>= 3.4) and a developpement version of rhdf5 :
# rhdf5 installation
source('https://bioconductor.org/biocLite.R')
BiocInstaller::useDevel() # for latest version
biocLite('rhdf5')
# update R (one way...)
# installing/loading the package:
if(!require(installr)) {
install.packages("installr"); require(installr)} #load / install+load installr
# using the package:
updateR() # this will start the updating process of your R installation. It will check for newer versions, and if one is available, will guide you through the decisions you'd need to make.
Load the package
library(antaresHdf5)
To convert a simulation you must use function writeAntaresH5
Convert a single simulation, path can be specify to give name of output file, default it take same name than input simulation folder
setSimulationPath("C:/Users/TTT/Mystudy", 1)
path <- "Mystudy.h5"
writeAntaresH5(path)
Convert all simulations from a study, parallel process, default 4 cores
setSimulationPath("C:/Users/TTT/Mystudy")
writeAntaresH5(writeAllSimulations = TRUE)
Choose timestep to write
writeAntaresH5(timeSteps = "hourly")
Write with additionnal information
writeAntaresH5(path, timeSteps = "hourly",
misc = FALSE, thermalAvailabilities = FALSE,
hydroStorage = FALSE, hydroStorageMaxPower = FALSE, reserve = FALSE,
linkCapacity = FALSE, mustRun = FALSE, thermalModulation = FALSE)
Function h5ReadAntares
This function Works the same way to antaresRead::readAntares
.
You must specify path
, path of h5 file to read.