getValues: Get values of a variable

View source: R/getValues.R

getValuesR Documentation

Get values of a variable

Description

Get all the values of a variable for some years Monte Carlo

Usage

getValues(data = NULL, variable = NULL, mcyear = "all")

Arguments

data

an object of class "antaresData" created with the function readAntares.

variable

a variable of data

mcyear

set of mcYear

Value

A data.table, data.frame class object containing the study's output data

Examples


library(antaresRead)
# with study test for example (study is in package antaresRead)
sourcedir <- system.file("testdata", package = "antaresRead")

# untar study in temp dir
path_latest <- file.path(tempdir(), "latest")
untar(file.path(sourcedir, "antares-test-study.tar.gz"), exdir = path_latest)

study_path <- file.path(path_latest, "test_case")

# set path to your Antares simulation
opts <- setSimulationPath(study_path)

# read output simulation
mydata <- readAntares(areas = "all",
                      links = "all",
                      clusters = "all",
                      timeStep = "annual",
                      mcYears = "all")

# get values of a variable
getValues(mydata$areas, variable="LIGNITE")
getValues(mydata$clusters, variable = "NODU")



rte-antares-rpackage/antaresProcessing documentation built on Dec. 8, 2024, 7:31 a.m.