getParameter: Get the value of a parameter if it exist or the default value...

Description Usage Arguments Examples

Description

Get the value of a parameter if it exist or the default value otherwise

Usage

1
getParameter(object, parameter, default = 0)

Arguments

parameter

the parameter which we want to extract

default

The default value which will be return in case the parameter does not exist

Examples

1
2
3
4
my_sim <- new("simulation", parameters = list("generations" = 100)
get_parameter(my_sim, "generations") # return 100
get_parameter(my_sim, "patch_number") # return 0
get_parameter(my_sim, "patch_number", default = 1) # return 1

frederic-michaud/RQuantiNemo documentation built on May 15, 2019, 2:51 a.m.