Skip to contents

Modify Scenario arguments

Usage

IAM.editArgs_Scenar(object, ...)

# S4 method for iamArgs
IAM.editArgs_Scenar(object, selected = NULL)

Arguments

object

a iamArgs-class object

...

selected argument

selected

name or number of scenario selected. NULL will desactivate the scenario module

Author

Maxime Jaunatre

Examples

data(IAM_argum_2009)
IAM.args_scenar(IAM_argum_2009)
#> $active
#> [1] 0
#> 
#> $ALLscenario
#> [1] "Sc_saisine"
#> 
#> $SELECTscen
#> [1] 1
#> 

# Activate scenario "Sc_saisine"
IAM_argum_2009 <- IAM.editArgs_Scenar(IAM_argum_2009, selected="Sc_saisine")
IAM.args_scenar(IAM_argum_2009)
#> $active
#> [1] 1
#> 
#> $ALLscenario
#> [1] "Sc_saisine"
#> 
#> $SELECTscen
#> [1] 1
#> 

# Desactivate scenario
IAM_argum_2009 <- IAM.editArgs_Scenar(IAM_argum_2009, selected = NULL)
IAM.args_scenar(IAM_argum_2009)
#> $active
#> [1] 0
#> 
#> $ALLscenario
#> [1] "Sc_saisine"
#> 
#> $SELECTscen
#> [1] 1
#> 

# Activate scenario "Sc_saisine"
IAM_argum_2009 <- IAM.editArgs_Scenar(IAM_argum_2009, selected = 1)
IAM.args_scenar(IAM_argum_2009)
#> $active
#> [1] 1
#> 
#> $ALLscenario
#> [1] "Sc_saisine"
#> 
#> $SELECTscen
#> [1] 1
#>