Skip to contents

This is intended for testing and for the examples in the documentation.

Usage

create_example_environment(site = "posieux")

Arguments

site

Choose for which example site an environment is to be created. Options: "posieux", "sorens".

Value

E A [ModvegeEnvironment] instance based on the example data for site which is shipped with this package.

Examples

extdata = system.file("extdata", package = "growR") 
print(extdata)
#> [1] "/home/runner/work/_temp/Library/growR/extdata"
list.files(extdata, recursive = TRUE)
#>  [1] "example_config.txt"      "posieux1.csv"           
#>  [3] "posieux2.csv"            "posieuxD.csv"           
#>  [5] "posieux_management1.txt" "posieux_management2.txt"
#>  [7] "posieux_parameters.csv"  "posieux_weather.txt"    
#>  [9] "sorens1.csv"             "sorens2.csv"            
#> [11] "sorens_management1.txt"  "sorens_management2.txt" 
#> [13] "sorens_parameters.csv"   "sorens_weather.txt"     
create_example_environment()
#> <ModvegeEnvironment>
#>   Public:
#>     clone: function (deep = FALSE) 
#>     get_environment_for_year: function (year) 
#>     initialize: function (site_name, run_name = "-", years = NULL, param_file = "-", 
#>     input_dir: 
#>     load_inputs: function () 
#>     make_filename_for_run: function (run_name) 
#>     management: ManagementData, R6
#>     management_file: /home/runner/work/_temp/Library/growR/extdata/posieux_ma ...
#>     param_file: /home/runner/work/_temp/Library/growR/extdata/posieux_pa ...
#>     parameters: ModvegeParameters, R6
#>     run_name: -
#>     run_name_in_filename: 
#>     set_run_name: function (run_name) 
#>     site_name: posieux1
#>     weather: WeatherData, R6
#>     weather_file: /home/runner/work/_temp/Library/growR/extdata/posieux_we ...
#>     years: 2013 2014 2015 2016