Nothing
context("Function .groupByDistrict")
sapply(studyPathS, function(studyPath){
opts <- setSimulationPath(studyPath)
describe(".groupByDistrict", {
it("groups data by district", {
mydata <- readAntares(c("a", "b"), select = "LOAD", timeStep = "monthly", showProgress = FALSE)
mydataAgg <- .groupByDistrict(mydata, opts)
expect_true(is.null(mydataAgg$area))
expect_false(any(duplicated(mydataAgg[, .(district, timeId, time)])))
expect_identical(mydataAgg$LOAD,
mydata[area=="a", LOAD] + mydata[area=="b", LOAD])
})
it("throws a warning if an area is missing", {
mydata <- readAntares("a", select = "LOAD", timeStep = "monthly", showProgress = FALSE)
expect_warning(.groupByDistrict(mydata, opts), " b$")
})
})
})
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.