From da866fd6a99e950111028dfe25b7f8fb46052051 Mon Sep 17 00:00:00 2001 From: byzheng Date: Wed, 24 Jan 2024 05:43:43 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20byzheng/?= =?UTF-8?q?rapsimng@53a86127a5f1fca73ad8cf6a54115ea2e68f6340=20?= =?UTF-8?q?=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- news/index.html | 2 +- pkgdown.yml | 2 +- search.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/news/index.html b/news/index.html index 600b0b8..e7677f2 100644 --- a/news/index.html +++ b/news/index.html @@ -73,7 +73,7 @@

RApsimNG 0.3.0
  • Several bug fixes
  • -

    RApsimNG 0.4.2

    +

    RApsimNG 0.4.2

    CRAN release: 2024-01-22

    • Several bug fixes
    • Update the new version of APSIM NG
    • Update update_cultivar to add new cultivar parameters
    • diff --git a/pkgdown.yml b/pkgdown.yml index 4d0f827..8a75bad 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -4,7 +4,7 @@ pkgdown_sha: ~ articles: modify: modify.html sensitivity: sensitivity.html -last_built: 2024-01-22T02:59Z +last_built: 2024-01-24T05:43Z urls: reference: https://rapsimng.bangyou.me/reference article: https://rapsimng.bangyou.me/articles diff --git a/search.json b/search.json index 5390443..55c911e 100644 --- a/search.json +++ b/search.json @@ -1 +1 @@ -[{"path":"https://rapsimng.bangyou.me/CODE_OF_CONDUCT.html","id":null,"dir":"","previous_headings":"","what":"Contributor Code of Conduct","title":"Contributor Code of Conduct","text":"contributors maintainers project, pledge respect people contribute reporting issues, posting feature requests, updating documentation, submitting pull requests patches, activities. committed making participation project harassment-free experience everyone, regardless level experience, gender, gender identity expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion. Examples unacceptable behavior participants include use sexual language imagery, derogatory comments personal attacks, trolling, public private harassment, insults, unprofessional conduct. Project maintainers right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct. Project maintainers follow Code Conduct may removed project team. Instances abusive, harassing, otherwise unacceptable behavior may reported opening issue contacting one project maintainers. Code Conduct adapted Contributor Covenant (http://contributor-covenant.org), version 1.0.0, available http://contributor-covenant.org/version/1/0/0/","code":""},{"path":"https://rapsimng.bangyou.me/articles/modify.html","id":"read-apsimx-file","dir":"Articles","previous_headings":"","what":"Read apsimx file","title":"Modify apsimx file","text":"read_apsimx used read files apsimx json format, .e. *.apsimx simulations *.json model resource.","code":"library(rapsimng) wheat <- read_apsimx(system.file(\"extdata/Wheat.json\", package = \"rapsimng\")) #wheat <- read_apsimx(\"inst/Wheat.json\")"},{"path":"https://rapsimng.bangyou.me/articles/modify.html","id":"modify-existing-model","dir":"Articles","previous_headings":"","what":"Modify existing model","title":"Modify apsimx file","text":"existing model can replaced removed. example shows update critical thermal remove .","code":"# Find the ThermalTime model a <- search_path(wheat, '[Wheat].Phenology.ThermalTime') a$node$Children[[1]]$X[[2]] #> [1] 26 # Update the optimum temperature a$node$Children[[1]]$X[[2]] <- 27 # Replace with new value wheat_new <- replace_model(wheat, a$path, a$node) b <- search_path(wheat_new, '[Wheat].Phenology.ThermalTime') # The optimum temperature should be updated now b$node$Children[[1]]$X[[2]] #> [1] 27 # The ThermalTime model can also be removed a <- search_path(wheat, '[Wheat].Phenology.ThermalTime') wheat_new <- remove_model(wheat, a$path) b <- search_path(wheat_new, '[Wheat].Phenology.ThermalTime') # The ThermalTime model should not be found now (i.e. Empty list) b #> list()"},{"path":"https://rapsimng.bangyou.me/articles/modify.html","id":"create-new-model","dir":"Articles","previous_headings":"","what":"Create new model","title":"Modify apsimx file","text":"Function new_model used generate required elements new model, e.g. createing new cultivar Hartog Command can updated specify new parameter values. Finally new cultivar can inserted apsimx file.","code":"new_cultivar <- new_model(\"PMF.Cultivar\", name = \"Hartog\") new_cultivar #> $`$type` #> [1] \"Models.PMF.Cultivar, Models\" #> #> $Name #> [1] \"Hartog\" #> #> $Children #> list() #> #> $IncludeInDocumentation #> [1] TRUE #> #> $Enabled #> [1] TRUE #> #> $ReadOnly #> [1] FALSE #> #> $Alias #> list() #> #> $Command #> list() new_cultivar$Command <- list( \"[Phenology].MinimumLeafNumber.FixedValue = 6\", \"[Phenology].VrnSensitivity.FixedValue = 0\") # Read the apsimx file wheat <- read_apsimx(system.file(\"extdata/wheat.apsimx\", package = \"rapsimng\")) # Create a new Replacements replacements <- new_model(\"Core.Replacements\") # Insert the replacements into root folder wheat_new <- insert_model(wheat, 1, replacements) replacements_node <- search_path(wheat_new, \".Simulations.Replacements\") replacements_node$path #> [1] 1 3 # Insert the new cultivar wheat_new <- insert_model(wheat_new, replacements_node$path, new_cultivar) # Check the new cultivar cultivar_node <- search_path(wheat_new, \".Simulations.Replacements.Hartog\") cultivar_node$path #> [1] 1 3 1 cultivar_node$node$Command #> [[1]] #> [1] \"[Phenology].MinimumLeafNumber.FixedValue = 6\" #> #> [[2]] #> [1] \"[Phenology].VrnSensitivity.FixedValue = 0\""},{"path":"https://rapsimng.bangyou.me/articles/modify.html","id":"available-models","dir":"Articles","previous_headings":"Create new model","what":"Available models","title":"Modify apsimx file","text":"new model can generated R according Models assemble APSIM Next Generation. rapsimng package stores copy Models.xml APSIM Next Generation 1st August, 2020. available models can listed using function available_models.","code":"head(data.frame(model = available_models())) #> model #> 1 AgPasture.AGPBiomass #> 2 AgPasture.BiomassAndN #> 3 AgPasture.BiomassAndNLayered #> 4 AgPasture.TissuesHelper #> 5 AgPasture.SimpleGrazing #> 6 AgPasture.SimpleGrazing.GrazingRotationTypeEnum"},{"path":"https://rapsimng.bangyou.me/articles/modify.html","id":"update-cultivar-parameter-values","dir":"Articles","previous_headings":"","what":"Update cultivar parameter values","title":"Modify apsimx file","text":"Function update_cultivar short way update parameter values cultivars.","code":"wheat <- read_apsimx(system.file(\"extdata/wheat.apsimx\", package = \"rapsimng\")) # Update cultivars df <- data.frame(name = rep(\"Hartog\", 3), parameter = c(\"[Phenology].MinimumLeafNumber.FixedValue\", \"[Phenology].VrnSensitivity.FixedValue\", \"[Phenology].PpSensitivity.FixedValue\"), value = c(9, 7, 3)) wheat_cultivar <- update_cultivar(wheat, df) # Check update cultivar paramters hartog <- search_path(wheat_cultivar, \"[Replacements].Hartog\") hartog$path #> NULL"},{"path":"https://rapsimng.bangyou.me/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Bangyou Zheng. Author, maintainer.","code":""},{"path":"https://rapsimng.bangyou.me/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Zheng B (2024). rapsimng: APSIM Next Generation. R package version 0.4.2, https://github.com/byzheng/rapsimng, https://rapsimng.bangyou./.","code":"@Manual{, title = {rapsimng: APSIM Next Generation}, author = {Bangyou Zheng}, year = {2024}, note = {R package version 0.4.2, https://github.com/byzheng/rapsimng}, url = {https://rapsimng.bangyou.me/}, }"},{"path":"https://rapsimng.bangyou.me/index.html","id":"rapsimng","dir":"","previous_headings":"","what":"APSIM Next Generation","title":"APSIM Next Generation","text":"rapsimng package designed modify run *.apsimx simulations using R APSIM Next Generation.","code":""},{"path":"https://rapsimng.bangyou.me/index.html","id":"features","dir":"","previous_headings":"","what":"Features","title":"APSIM Next Generation","text":"Find elements *.apsimx file","code":""},{"path":"https://rapsimng.bangyou.me/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"APSIM Next Generation","text":"Install CRAN. Install developing version Github.","code":"install.packages('rapsimng') remotes::install_github('byzheng/rapsimng')"},{"path":"https://rapsimng.bangyou.me/index.html","id":"read-apsimx-file","dir":"","previous_headings":"","what":"Read APSIMX file","title":"APSIM Next Generation","text":"wheat.apsimx validation dataset APSIM NG used example. Function read_apsimx used read *.apsimx file jsonlite::read_json returns list.","code":"# Read Wheat.apsimx file with `read_apsimx` which returns a list of json results. file <- system.file(\"extdata/wheat.apsimx\", package = \"rapsimng\") m <- read_apsimx(file)"},{"path":"https://rapsimng.bangyou.me/index.html","id":"search-by-of-apsim-ng","dir":"","previous_headings":"","what":"Search by of APSIM NG","title":"APSIM Next Generation","text":"node apsimx file can found using path specification APSIM NG.","code":"potential <- search_path(m, path = '[Structure].BranchingRate.PotentialBranchingRate.Vegetative.PotentialBranchingRate') potential"},{"path":"https://rapsimng.bangyou.me/index.html","id":"modify-a-found-model","dir":"","previous_headings":"","what":"Modify a found model","title":"APSIM Next Generation","text":"","code":"new_model <- potential$node new_model$XProperty <- 'NewVariable'"},{"path":"https://rapsimng.bangyou.me/index.html","id":"replace-the-new-model","dir":"","previous_headings":"","what":"Replace the new model","title":"APSIM Next Generation","text":"","code":"new <- replace_model(m, potential$path, new_model)"},{"path":"https://rapsimng.bangyou.me/index.html","id":"save-into-a-new-apsimx-file","dir":"","previous_headings":"","what":"Save into a new apsimx file","title":"APSIM Next Generation","text":"","code":"write_apsimx(new, tempfile(fileext = '.json'))"},{"path":"https://rapsimng.bangyou.me/index.html","id":"run-apsimx-file","dir":"","previous_headings":"","what":"Run apsimx file","title":"APSIM Next Generation","text":"function run_models wrapped APSIM NG Models.exe command line can called run apsimx files. See APSIM website documentation.","code":""},{"path":"https://rapsimng.bangyou.me/reference/append_model.html","id":null,"dir":"Reference","previous_headings":"","what":"append a model into apsimx — append_model","title":"append a model into apsimx — append_model","text":"append model apsimx","code":""},{"path":"https://rapsimng.bangyou.me/reference/append_model.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"append a model into apsimx — append_model","text":"","code":"append_model(l, path, model)"},{"path":"https://rapsimng.bangyou.me/reference/append_model.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"append a model into apsimx — append_model","text":"l list apsimx file path numeric, path returned search_path search_node. character, path supported apsimx model new model list new models","code":""},{"path":"https://rapsimng.bangyou.me/reference/append_model.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"append a model into apsimx — append_model","text":"modified list new value","code":""},{"path":"https://rapsimng.bangyou.me/reference/append_model.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"append a model into apsimx — append_model","text":"","code":"wheat <- read_apsimx(system.file(\"extdata/wheat.apsimx\", package = \"rapsimng\")) replacements <- new_model(\"Core.Replacements\") wheat_new <- insert_model(wheat, 1, replacements) replacements_node <- search_path(wheat_new, \".Simulations.Replacements\") replacements_node$path #> [1] 1 3 # Add a cultivar folder under replacements cultivar_folder <- new_model(\"PMF.CultivarFolder\", \"Cultivars\") wheat_new <- insert_model(wheat_new, replacements_node$path, cultivar_folder) cultivar_folder_node <- search_path(wheat_new, \".Simulations.Replacements.Cultivars\") cultivar_folder_node$path #> [1] 1 3 1 # Add an new cultivar cultivar <- new_model(\"PMF.Cultivar\", \"Hartog\") wheat_new <- insert_model(wheat_new, cultivar_folder_node$path, cultivar) cultivar_node <- search_path(wheat_new, \".Simulations.Replacements.Cultivars.Hartog\") cultivar_node$path #> [1] 1 3 1 1 # Append another cultivar cultivar2 <- new_model(\"PMF.Cultivar\", \"Axe\") wheat_new <- append_model(wheat_new, cultivar_node$path, list(cultivar2)) cultivar2_node <- search_path(wheat_new, \".Simulations.Replacements.Cultivars.Axe\") cultivar2_node$path #> [1] 1 3 1 2"},{"path":"https://rapsimng.bangyou.me/reference/available_models.html","id":null,"dir":"Reference","previous_headings":"","what":"List all available models in APSIM NG — available_models","title":"List all available models in APSIM NG — available_models","text":"List available models APSIM NG","code":""},{"path":"https://rapsimng.bangyou.me/reference/available_models.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"List all available models in APSIM NG — available_models","text":"","code":"available_models()"},{"path":"https://rapsimng.bangyou.me/reference/available_models.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"List all available models in APSIM NG — available_models","text":"character vector available models","code":""},{"path":"https://rapsimng.bangyou.me/reference/available_models.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"List all available models in APSIM NG — available_models","text":"","code":"a <- available_models() a[1:10] #> [1] \"AgPasture.AGPBiomass\" #> [2] \"AgPasture.BiomassAndN\" #> [3] \"AgPasture.BiomassAndNLayered\" #> [4] \"AgPasture.TissuesHelper\" #> [5] \"AgPasture.SimpleGrazing\" #> [6] \"AgPasture.SimpleGrazing.GrazingRotationTypeEnum\" #> [7] \"AgPasture.SimpleGrazing.UrineReturnType\" #> [8] \"AgPasture.PastureSpecies\" #> [9] \"AgPasture.PastureSpecies.BiomassRemovedDelegate\" #> [10] \"AgPasture.PastureSpecies.YesNoAnswer\""},{"path":"https://rapsimng.bangyou.me/reference/disable_models.html","id":null,"dir":"Reference","previous_headings":"","what":"Disable models in apsimx — disable_models","title":"Disable models in apsimx — disable_models","text":"Disable models apsimx","code":""},{"path":"https://rapsimng.bangyou.me/reference/disable_models.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Disable models in apsimx — disable_models","text":"","code":"disable_models(l, paths)"},{"path":"https://rapsimng.bangyou.me/reference/disable_models.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Disable models in apsimx — disable_models","text":"l list apsimx file paths numeric, path returned search_path search_node. character, path supported apsimx","code":""},{"path":"https://rapsimng.bangyou.me/reference/disable_models.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Disable models in apsimx — disable_models","text":"modified list new value","code":""},{"path":"https://rapsimng.bangyou.me/reference/disable_models.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Disable models in apsimx — disable_models","text":"","code":"wheat <- read_apsimx(system.file(\"extdata/Wheat.json\", package = \"rapsimng\")) a <- disable_models(wheat, '[Wheat].Phenology.ThermalTime')"},{"path":"https://rapsimng.bangyou.me/reference/get_cultivar.html","id":null,"dir":"Reference","previous_headings":"","what":"Get all cultivar parameters in a model — get_cultivar","title":"Get all cultivar parameters in a model — get_cultivar","text":"Get cultivar parameters model","code":""},{"path":"https://rapsimng.bangyou.me/reference/get_cultivar.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get all cultivar parameters in a model — get_cultivar","text":"","code":"get_cultivar(l, alias = TRUE)"},{"path":"https://rapsimng.bangyou.me/reference/get_cultivar.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get all cultivar parameters in a model — get_cultivar","text":"l list apsimx file alias Whether export alias","code":""},{"path":"https://rapsimng.bangyou.me/reference/get_cultivar.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get all cultivar parameters in a model — get_cultivar","text":"data frame cultivar parameters","code":""},{"path":"https://rapsimng.bangyou.me/reference/get_cultivar.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get all cultivar parameters in a model — get_cultivar","text":"","code":"wheat <- read_apsimx(system.file(\"extdata/Wheat.json\", package = \"rapsimng\")) get_cultivar(wheat) #> name parameter value #> 1 Cul1 [Phenology].MinimumLeafNumber.FixedValue 1 #> 2 Cul1 [Phenology].VrnSensitivity.FixedValue 0 #> 3 Cul1 [Phenology].PpSensitivity.FixedValue 2 #> 4 Cul1 [Phenology].HeadEmergencePpSensitivity.FixedValue 0 #> 5 Cul1 [Phenology].Phyllochron.BasePhyllochron.FixedValue 100 #> 6 Cul6 [Phenology].MinimumLeafNumber.FixedValue 1 #> 7 Cul6 [Phenology].VrnSensitivity.FixedValue 0 #> 8 Cul6 [Phenology].PpSensitivity.FixedValue 2 #> 9 Cul6 [Phenology].HeadEmergencePpSensitivity.FixedValue 0 #> 10 Cul6 [Phenology].Phyllochron.BasePhyllochron.FixedValue 100 #> 11 Cul2 [Phenology].MinimumLeafNumber.FixedValue 1 #> 12 Cul2 [Phenology].VrnSensitivity.FixedValue 0 #> 13 Cul2 [Phenology].PpSensitivity.FixedValue 2 #> 14 Cul2 [Phenology].HeadEmergencePpSensitivity.FixedValue 0 #> 15 Cul2 [Phenology].Phyllochron.BasePhyllochron.FixedValue 100 #> 16 Cul3 [Phenology].MinimumLeafNumber.FixedValue 1 #> 17 Cul3 [Phenology].VrnSensitivity.FixedValue 0 #> 18 Cul3 [Phenology].PpSensitivity.FixedValue 2 #> 19 Cul3 [Phenology].HeadEmergencePpSensitivity.FixedValue 0 #> 20 Cul3 [Phenology].Phyllochron.BasePhyllochron.FixedValue 100 #> 21 Cul4 [Phenology].MinimumLeafNumber.FixedValue 1 #> 22 Cul4 [Phenology].VrnSensitivity.FixedValue 0 #> 23 Cul4 [Phenology].PpSensitivity.FixedValue 2 #> 24 Cul4 [Phenology].HeadEmergencePpSensitivity.FixedValue 0 #> 25 Cul4 [Phenology].Phyllochron.BasePhyllochron.FixedValue 100 #> 26 Cul5 [Phenology].MinimumLeafNumber.FixedValue 1 #> 27 Cul5 [Phenology].VrnSensitivity.FixedValue 0 #> 28 Cul5 [Phenology].PpSensitivity.FixedValue 2 #> 29 Cul5 [Phenology].HeadEmergencePpSensitivity.FixedValue 0 #> 30 Cul5 [Phenology].Phyllochron.BasePhyllochron.FixedValue 100 get_cultivar(wheat, alias = FALSE) #> name parameter value #> 1 Cul1 [Phenology].MinimumLeafNumber.FixedValue 1 #> 2 Cul1 [Phenology].VrnSensitivity.FixedValue 0 #> 3 Cul1 [Phenology].PpSensitivity.FixedValue 2 #> 4 Cul1 [Phenology].HeadEmergencePpSensitivity.FixedValue 0 #> 5 Cul1 [Phenology].Phyllochron.BasePhyllochron.FixedValue 100 #> 6 Cul2 [Phenology].MinimumLeafNumber.FixedValue 1 #> 7 Cul2 [Phenology].VrnSensitivity.FixedValue 0 #> 8 Cul2 [Phenology].PpSensitivity.FixedValue 2 #> 9 Cul2 [Phenology].HeadEmergencePpSensitivity.FixedValue 0 #> 10 Cul2 [Phenology].Phyllochron.BasePhyllochron.FixedValue 100 #> 11 Cul3 [Phenology].MinimumLeafNumber.FixedValue 1 #> 12 Cul3 [Phenology].VrnSensitivity.FixedValue 0 #> 13 Cul3 [Phenology].PpSensitivity.FixedValue 2 #> 14 Cul3 [Phenology].HeadEmergencePpSensitivity.FixedValue 0 #> 15 Cul3 [Phenology].Phyllochron.BasePhyllochron.FixedValue 100 #> 16 Cul4 [Phenology].MinimumLeafNumber.FixedValue 1 #> 17 Cul4 [Phenology].VrnSensitivity.FixedValue 0 #> 18 Cul4 [Phenology].PpSensitivity.FixedValue 2 #> 19 Cul4 [Phenology].HeadEmergencePpSensitivity.FixedValue 0 #> 20 Cul4 [Phenology].Phyllochron.BasePhyllochron.FixedValue 100 #> 21 Cul5 [Phenology].MinimumLeafNumber.FixedValue 1 #> 22 Cul5 [Phenology].VrnSensitivity.FixedValue 0 #> 23 Cul5 [Phenology].PpSensitivity.FixedValue 2 #> 24 Cul5 [Phenology].HeadEmergencePpSensitivity.FixedValue 0 #> 25 Cul5 [Phenology].Phyllochron.BasePhyllochron.FixedValue 100"},{"path":"https://rapsimng.bangyou.me/reference/get_metfile.html","id":null,"dir":"Reference","previous_headings":"","what":"Get the met file name for an experiment — get_metfile","title":"Get the met file name for an experiment — get_metfile","text":"Get met file name experiment","code":""},{"path":"https://rapsimng.bangyou.me/reference/get_metfile.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get the met file name for an experiment — get_metfile","text":"","code":"get_metfile(l, is_stop = TRUE)"},{"path":"https://rapsimng.bangyou.me/reference/get_metfile.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get the met file name for an experiment — get_metfile","text":"l list apsimxNode red read_apsimx is_stop Whether stop function error","code":""},{"path":"https://rapsimng.bangyou.me/reference/get_metfile.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get the met file name for an experiment — get_metfile","text":"met file name experiment","code":""},{"path":"https://rapsimng.bangyou.me/reference/get_metfile.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get the met file name for an experiment — get_metfile","text":"","code":"wheat <- read_apsimx(system.file(\"extdata/wheat.apsimx\", package = \"rapsimng\")) exp <- search_path(wheat, path = \"[Experiment]\") get_metfile(exp) #> [1] \"example.met\""},{"path":"https://rapsimng.bangyou.me/reference/get_parent.html","id":null,"dir":"Reference","previous_headings":"","what":"Get the parent node from a path — get_parent","title":"Get the parent node from a path — get_parent","text":"Get parent node path","code":""},{"path":"https://rapsimng.bangyou.me/reference/get_parent.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get the parent node from a path — get_parent","text":"","code":"get_parent(l, path)"},{"path":"https://rapsimng.bangyou.me/reference/get_parent.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get the parent node from a path — get_parent","text":"l list apsimx file path numeric, path returned search_path search_node. character, path supported apsimx","code":""},{"path":"https://rapsimng.bangyou.me/reference/get_parent.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get the parent node from a path — get_parent","text":"new list parent","code":""},{"path":"https://rapsimng.bangyou.me/reference/get_parent.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get the parent node from a path — get_parent","text":"","code":"wheat <- read_apsimx(system.file(\"extdata/Wheat.json\", package = \"rapsimng\")) a <- search_path(wheat, '[Structure].BranchingRate') get_parent(wheat, a$path) #> $node #> $node$`$type` #> [1] \"Models.PMF.Struct.Structure, Models\" #> #> $node$CohortInitialisationStage #> [1] \"Germination\" #> #> $node$LeafInitialisationStage #> [1] \"Emergence\" #> #> $node$Name #> [1] \"Structure\" #> #> $node$Children #> $node$Children[[1]] #> $node$Children[[1]]$`$type` #> [1] \"Models.Functions.MultiplyFunction, Models\" #> #> $node$Children[[1]]$Name #> [1] \"BranchingRate\" #> #> $node$Children[[1]]$Children #> $node$Children[[1]]$Children[[1]] #> $node$Children[[1]]$Children[[1]]$`$type` #> [1] \"Models.Functions.PhaseLookup, Models\" #> #> $node$Children[[1]]$Children[[1]]$Name #> [1] \"PotentialBranchingRate\" #> #> $node$Children[[1]]$Children[[1]]$Children #> $node$Children[[1]]$Children[[1]]$Children[[1]] #> $node$Children[[1]]$Children[[1]]$Children[[1]]$`$type` #> [1] \"Models.Functions.PhaseLookupValue, Models\" #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Start #> [1] \"Emergence\" #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$End #> [1] \"TerminalSpikelet\" #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Name #> [1] \"Vegetative\" #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]] #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$`$type` #> [1] \"Models.Functions.LinearInterpolationFunction, Models\" #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Name #> [1] \"PotentialBranchingRate\" #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]] #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$`$type` #> [1] \"Models.Functions.XYPairs, Models\" #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$X #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$X[[1]] #> [1] 1 #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$X[[2]] #> [1] 2 #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$X[[3]] #> [1] 3 #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$X[[4]] #> [1] 4 #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$X[[5]] #> [1] 5 #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$X[[6]] #> [1] 6 #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$X[[7]] #> [1] 7 #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$X[[8]] #> [1] 8 #> #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Y #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Y[[1]] #> [1] 0 #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Y[[2]] #> [1] 0 #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Y[[3]] #> [1] 1 #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Y[[4]] #> [1] 2 #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Y[[5]] #> [1] 5 #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Y[[6]] #> [1] 7 #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Y[[7]] #> [1] 15 #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Y[[8]] #> [1] 23 #> #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Name #> [1] \"XYPairs\" #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children #> list() #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$IncludeInDocumentation #> [1] TRUE #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Enabled #> [1] TRUE #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$ReadOnly #> [1] FALSE #> #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children[[2]] #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children[[2]]$`$type` #> [1] \"Models.Functions.VariableReference, Models\" #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children[[2]]$VariableName #> [1] \"[Structure].LeafTipsAppeared\" #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children[[2]]$Name #> [1] \"XValue\" #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children[[2]]$Children #> list() #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children[[2]]$IncludeInDocumentation #> [1] TRUE #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children[[2]]$Enabled #> [1] TRUE #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children[[2]]$ReadOnly #> [1] FALSE #> #> #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$IncludeInDocumentation #> [1] TRUE #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Enabled #> [1] TRUE #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$ReadOnly #> [1] FALSE #> #> #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$IncludeInDocumentation #> [1] TRUE #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Enabled #> [1] TRUE #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$ReadOnly #> [1] FALSE #> #> #> $node$Children[[1]]$Children[[1]]$Children[[2]] #> $node$Children[[1]]$Children[[1]]$Children[[2]]$`$type` #> [1] \"Models.Functions.PhaseLookupValue, Models\" #> #> $node$Children[[1]]$Children[[1]]$Children[[2]]$Start #> [1] \"TerminalSpikelet\" #> #> $node$Children[[1]]$Children[[1]]$Children[[2]]$End #> [1] \"HarvestRipe\" #> #> $node$Children[[1]]$Children[[1]]$Children[[2]]$Name #> [1] \"Reproductive\" #> #> $node$Children[[1]]$Children[[1]]$Children[[2]]$Children #> $node$Children[[1]]$Children[[1]]$Children[[2]]$Children[[1]] #> $node$Children[[1]]$Children[[1]]$Children[[2]]$Children[[1]]$`$type` #> [1] \"Models.Functions.Constant, Models\" #> #> $node$Children[[1]]$Children[[1]]$Children[[2]]$Children[[1]]$FixedValue #> [1] 0 #> #> $node$Children[[1]]$Children[[1]]$Children[[2]]$Children[[1]]$Units #> NULL #> #> $node$Children[[1]]$Children[[1]]$Children[[2]]$Children[[1]]$Name #> [1] \"Zero\" #> #> $node$Children[[1]]$Children[[1]]$Children[[2]]$Children[[1]]$Children #> list() #> #> $node$Children[[1]]$Children[[1]]$Children[[2]]$Children[[1]]$IncludeInDocumentation #> [1] TRUE #> #> $node$Children[[1]]$Children[[1]]$Children[[2]]$Children[[1]]$Enabled #> [1] TRUE #> #> $node$Children[[1]]$Children[[1]]$Children[[2]]$Children[[1]]$ReadOnly #> [1] FALSE #> #> #> #> $node$Children[[1]]$Children[[1]]$Children[[2]]$IncludeInDocumentation #> [1] TRUE #> #> $node$Children[[1]]$Children[[1]]$Children[[2]]$Enabled #> [1] TRUE #> #> $node$Children[[1]]$Children[[1]]$Children[[2]]$ReadOnly #> [1] FALSE #> #> #> #> $node$Children[[1]]$Children[[1]]$IncludeInDocumentation #> [1] TRUE #> #> $node$Children[[1]]$Children[[1]]$Enabled #> [1] TRUE #> #> $node$Children[[1]]$Children[[1]]$ReadOnly #> [1] FALSE #> #> #> $node$Children[[1]]$Children[[2]] #> $node$Children[[1]]$Children[[2]]$`$type` #> [1] \"Models.Functions.MinimumFunction, Models\" #> #> $node$Children[[1]]$Children[[2]]$Name #> [1] \"StressFactors\" #> #> $node$Children[[1]]$Children[[2]]$Children #> $node$Children[[1]]$Children[[2]]$Children[[1]] #> $node$Children[[1]]$Children[[2]]$Children[[1]]$`$type` #> [1] \"Models.Functions.LinearInterpolationFunction, Models\" #> #> $node$Children[[1]]$Children[[2]]$Children[[1]]$Name #> [1] \"CoverEffect\" #> #> $node$Children[[1]]$Children[[2]]$Children[[1]]$Children #> $node$Children[[1]]$Children[[2]]$Children[[1]]$Children[[1]] #> $node$Children[[1]]$Children[[2]]$Children[[1]]$Children[[1]]$`$type` #> [1] \"Models.Functions.XYPairs, Models\" #> #> $node$Children[[1]]$Children[[2]]$Children[[1]]$Children[[1]]$X #> $node$Children[[1]]$Children[[2]]$Children[[1]]$Children[[1]]$X[[1]] #> [1] 0 #> #> $node$Children[[1]]$Children[[2]]$Children[[1]]$Children[[1]]$X[[2]] #> [1] 0.1 #> #> $node$Children[[1]]$Children[[2]]$Children[[1]]$Children[[1]]$X[[3]] #> [1] 0.3 #> #> #> $node$Children[[1]]$Children[[2]]$Children[[1]]$Children[[1]]$Y #> $node$Children[[1]]$Children[[2]]$Children[[1]]$Children[[1]]$Y[[1]] #> [1] 1 #> #> $node$Children[[1]]$Children[[2]]$Children[[1]]$Children[[1]]$Y[[2]] #> [1] 1 #> #> $node$Children[[1]]$Children[[2]]$Children[[1]]$Children[[1]]$Y[[3]] #> [1] 0 #> #> #> $node$Children[[1]]$Children[[2]]$Children[[1]]$Children[[1]]$Name #> [1] \"XYPairs\" #> #> $node$Children[[1]]$Children[[2]]$Children[[1]]$Children[[1]]$Children #> list() #> #> $node$Children[[1]]$Children[[2]]$Children[[1]]$Children[[1]]$IncludeInDocumentation #> [1] TRUE #> #> $node$Children[[1]]$Children[[2]]$Children[[1]]$Children[[1]]$Enabled #> [1] TRUE #> #> $node$Children[[1]]$Children[[2]]$Children[[1]]$Children[[1]]$ReadOnly #> [1] FALSE #> #> #> $node$Children[[1]]$Children[[2]]$Children[[1]]$Children[[2]] #> $node$Children[[1]]$Children[[2]]$Children[[1]]$Children[[2]]$`$type` #> [1] \"Models.Functions.VariableReference, Models\" #> #> $node$Children[[1]]$Children[[2]]$Children[[1]]$Children[[2]]$VariableName #> [1] \"[Leaf].CoverTotal\" #> #> $node$Children[[1]]$Children[[2]]$Children[[1]]$Children[[2]]$Name #> [1] \"XValue\" #> #> $node$Children[[1]]$Children[[2]]$Children[[1]]$Children[[2]]$Children #> list() #> #> $node$Children[[1]]$Children[[2]]$Children[[1]]$Children[[2]]$IncludeInDocumentation #> [1] TRUE #> #> $node$Children[[1]]$Children[[2]]$Children[[1]]$Children[[2]]$Enabled #> [1] TRUE #> #> $node$Children[[1]]$Children[[2]]$Children[[1]]$Children[[2]]$ReadOnly #> [1] FALSE #> #> #> #> $node$Children[[1]]$Children[[2]]$Children[[1]]$IncludeInDocumentation #> [1] TRUE #> #> $node$Children[[1]]$Children[[2]]$Children[[1]]$Enabled #> [1] TRUE #> #> $node$Children[[1]]$Children[[2]]$Children[[1]]$ReadOnly #> [1] FALSE #> #> #> #> $node$Children[[1]]$Children[[2]]$IncludeInDocumentation #> [1] TRUE #> #> $node$Children[[1]]$Children[[2]]$Enabled #> [1] TRUE #> #> $node$Children[[1]]$Children[[2]]$ReadOnly #> [1] FALSE #> #> #> #> $node$Children[[1]]$IncludeInDocumentation #> [1] TRUE #> #> $node$Children[[1]]$Enabled #> [1] TRUE #> #> $node$Children[[1]]$ReadOnly #> [1] FALSE #> #> #> $node$Children[[2]] #> $node$Children[[2]]$`$type` #> [1] \"Models.PMF.Struct.HeightFunction, Models\" #> #> $node$Children[[2]]$Name #> [1] \"HeightModel\" #> #> $node$Children[[2]]$Children #> $node$Children[[2]]$Children[[1]] #> $node$Children[[2]]$Children[[1]]$`$type` #> [1] \"Models.Functions.LinearInterpolationFunction, Models\" #> #> $node$Children[[2]]$Children[[1]]$Name #> [1] \"PotentialHeight\" #> #> $node$Children[[2]]$Children[[1]]$Children #> $node$Children[[2]]$Children[[1]]$Children[[1]] #> $node$Children[[2]]$Children[[1]]$Children[[1]]$`$type` #> [1] \"Models.Functions.XYPairs, Models\" #> #> $node$Children[[2]]$Children[[1]]$Children[[1]]$X #> $node$Children[[2]]$Children[[1]]$Children[[1]]$X[[1]] #> [1] 3 #> #> $node$Children[[2]]$Children[[1]]$Children[[1]]$X[[2]] #> [1] 4 #> #> $node$Children[[2]]$Children[[1]]$Children[[1]]$X[[3]] #> [1] 5 #> #> $node$Children[[2]]$Children[[1]]$Children[[1]]$X[[4]] #> [1] 6 #> #> $node$Children[[2]]$Children[[1]]$Children[[1]]$X[[5]] #> [1] 7 #> #> $node$Children[[2]]$Children[[1]]$Children[[1]]$X[[6]] #> [1] 8 #> #> $node$Children[[2]]$Children[[1]]$Children[[1]]$X[[7]] #> [1] 9 #> #> #> $node$Children[[2]]$Children[[1]]$Children[[1]]$Y #> $node$Children[[2]]$Children[[1]]$Children[[1]]$Y[[1]] #> [1] 10 #> #> $node$Children[[2]]$Children[[1]]$Children[[1]]$Y[[2]] #> [1] 200 #> #> $node$Children[[2]]$Children[[1]]$Children[[1]]$Y[[3]] #> [1] 200 #> #> $node$Children[[2]]$Children[[1]]$Children[[1]]$Y[[4]] #> [1] 1000 #> #> $node$Children[[2]]$Children[[1]]$Children[[1]]$Y[[5]] #> [1] 1000 #> #> $node$Children[[2]]$Children[[1]]$Children[[1]]$Y[[6]] #> [1] 1000 #> #> $node$Children[[2]]$Children[[1]]$Children[[1]]$Y[[7]] #> [1] 1000 #> #> #> $node$Children[[2]]$Children[[1]]$Children[[1]]$Name #> [1] \"XYPairs\" #> #> $node$Children[[2]]$Children[[1]]$Children[[1]]$Children #> list() #> #> $node$Children[[2]]$Children[[1]]$Children[[1]]$IncludeInDocumentation #> [1] TRUE #> #> $node$Children[[2]]$Children[[1]]$Children[[1]]$Enabled #> [1] TRUE #> #> $node$Children[[2]]$Children[[1]]$Children[[1]]$ReadOnly #> [1] FALSE #> #> #> $node$Children[[2]]$Children[[1]]$Children[[2]] #> $node$Children[[2]]$Children[[1]]$Children[[2]]$`$type` #> [1] \"Models.Functions.VariableReference, Models\" #> #> $node$Children[[2]]$Children[[1]]$Children[[2]]$VariableName #> [1] \"[Phenology].Stage\" #> #> $node$Children[[2]]$Children[[1]]$Children[[2]]$Name #> [1] \"XValue\" #> #> $node$Children[[2]]$Children[[1]]$Children[[2]]$Children #> list() #> #> $node$Children[[2]]$Children[[1]]$Children[[2]]$IncludeInDocumentation #> [1] TRUE #> #> $node$Children[[2]]$Children[[1]]$Children[[2]]$Enabled #> [1] TRUE #> #> $node$Children[[2]]$Children[[1]]$Children[[2]]$ReadOnly #> [1] FALSE #> #> #> #> $node$Children[[2]]$Children[[1]]$IncludeInDocumentation #> [1] TRUE #> #> $node$Children[[2]]$Children[[1]]$Enabled #> [1] TRUE #> #> $node$Children[[2]]$Children[[1]]$ReadOnly #> [1] FALSE #> #> #> $node$Children[[2]]$Children[[2]] #> $node$Children[[2]]$Children[[2]]$`$type` #> [1] \"Models.Functions.LinearInterpolationFunction, Models\" #> #> $node$Children[[2]]$Children[[2]]$Name #> [1] \"WaterStress\" #> #> $node$Children[[2]]$Children[[2]]$Children #> $node$Children[[2]]$Children[[2]]$Children[[1]] #> $node$Children[[2]]$Children[[2]]$Children[[1]]$`$type` #> [1] \"Models.Functions.XYPairs, Models\" #> #> $node$Children[[2]]$Children[[2]]$Children[[1]]$X #> $node$Children[[2]]$Children[[2]]$Children[[1]]$X[[1]] #> [1] 0.3 #> #> $node$Children[[2]]$Children[[2]]$Children[[1]]$X[[2]] #> [1] 1 #> #> #> $node$Children[[2]]$Children[[2]]$Children[[1]]$Y #> $node$Children[[2]]$Children[[2]]$Children[[1]]$Y[[1]] #> [1] 0 #> #> $node$Children[[2]]$Children[[2]]$Children[[1]]$Y[[2]] #> [1] 1 #> #> #> $node$Children[[2]]$Children[[2]]$Children[[1]]$Name #> [1] \"XYPairs\" #> #> $node$Children[[2]]$Children[[2]]$Children[[1]]$Children #> list() #> #> $node$Children[[2]]$Children[[2]]$Children[[1]]$IncludeInDocumentation #> [1] TRUE #> #> $node$Children[[2]]$Children[[2]]$Children[[1]]$Enabled #> [1] TRUE #> #> $node$Children[[2]]$Children[[2]]$Children[[1]]$ReadOnly #> [1] FALSE #> #> #> $node$Children[[2]]$Children[[2]]$Children[[2]] #> $node$Children[[2]]$Children[[2]]$Children[[2]]$`$type` #> [1] \"Models.Functions.VariableReference, Models\" #> #> $node$Children[[2]]$Children[[2]]$Children[[2]]$VariableName #> [1] \"[Leaf].Fw\" #> #> $node$Children[[2]]$Children[[2]]$Children[[2]]$Name #> [1] \"XValue\" #> #> $node$Children[[2]]$Children[[2]]$Children[[2]]$Children #> list() #> #> $node$Children[[2]]$Children[[2]]$Children[[2]]$IncludeInDocumentation #> [1] TRUE #> #> $node$Children[[2]]$Children[[2]]$Children[[2]]$Enabled #> [1] TRUE #> #> $node$Children[[2]]$Children[[2]]$Children[[2]]$ReadOnly #> [1] FALSE #> #> #> #> $node$Children[[2]]$Children[[2]]$IncludeInDocumentation #> [1] TRUE #> #> $node$Children[[2]]$Children[[2]]$Enabled #> [1] TRUE #> #> $node$Children[[2]]$Children[[2]]$ReadOnly #> [1] FALSE #> #> #> #> $node$Children[[2]]$IncludeInDocumentation #> [1] TRUE #> #> $node$Children[[2]]$Enabled #> [1] TRUE #> #> $node$Children[[2]]$ReadOnly #> [1] FALSE #> #> #> #> $node$IncludeInDocumentation #> [1] TRUE #> #> $node$Enabled #> [1] TRUE #> #> $node$ReadOnly #> [1] FALSE #> #> #> $path #> [1] 1 1 4 #>"},{"path":"https://rapsimng.bangyou.me/reference/get_simulations.html","id":null,"dir":"Reference","previous_headings":"","what":"Get simulations for a factorial experiment — get_simulations","title":"Get simulations for a factorial experiment — get_simulations","text":"Get simulations factorial experiment","code":""},{"path":"https://rapsimng.bangyou.me/reference/get_simulations.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get simulations for a factorial experiment — get_simulations","text":"","code":"get_simulations(l)"},{"path":"https://rapsimng.bangyou.me/reference/get_simulations.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get simulations for a factorial experiment — get_simulations","text":"l list read_apsim Factorial.Permutation root.","code":""},{"path":"https://rapsimng.bangyou.me/reference/get_simulations.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get simulations for a factorial experiment — get_simulations","text":"list Factor name Levels values","code":""},{"path":"https://rapsimng.bangyou.me/reference/get_simulations.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get simulations for a factorial experiment — get_simulations","text":"","code":"wheat <- read_apsimx(system.file(\"extdata/wheat.apsimx\", package = \"rapsimng\")) permutation <- search_path(wheat, path = \"[Factors].Permutation\") get_simulations(permutation$node) #> $V #> [1] \"1\" \"2\" #> #> $Cv #> [1] \"Axe\" \"Bolac\" \"Calingiri\" #> #> $N #> [1] \"0\" \"200\" #>"},{"path":"https://rapsimng.bangyou.me/reference/insert_model.html","id":null,"dir":"Reference","previous_headings":"","what":"Insert a model into apsimx — insert_model","title":"Insert a model into apsimx — insert_model","text":"Insert model apsimx","code":""},{"path":"https://rapsimng.bangyou.me/reference/insert_model.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Insert a model into apsimx — insert_model","text":"","code":"insert_model(l, path, model)"},{"path":"https://rapsimng.bangyou.me/reference/insert_model.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Insert a model into apsimx — insert_model","text":"l list apsimx file path numeric, path returned search_path search_node. character, path supported apsimx model new model","code":""},{"path":"https://rapsimng.bangyou.me/reference/insert_model.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Insert a model into apsimx — insert_model","text":"modified list new value","code":""},{"path":"https://rapsimng.bangyou.me/reference/insert_model.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Insert a model into apsimx — insert_model","text":"","code":"wheat <- read_apsimx(system.file(\"extdata/wheat.apsimx\", package = \"rapsimng\")) replacements <- new_model(\"Core.Replacements\") wheat_new <- insert_model(wheat, 1, replacements) replacements_node <- search_path(wheat_new, \".Simulations.Replacements\") replacements_node$path #> [1] 1 3 # Add a cultivar folder under replacements cultivar_folder <- new_model(\"PMF.CultivarFolder\", \"Cultivars\") wheat_new <- insert_model(wheat_new, replacements_node$path, cultivar_folder) cultivar_folder_node <- search_path(wheat_new, \".Simulations.Replacements.Cultivars\") cultivar_folder_node$path #> [1] 1 3 1 # Add an new cultivar cultivar <- new_model(\"PMF.Cultivar\", \"Hartog\") wheat_new <- insert_model(wheat_new, cultivar_folder_node$path, cultivar) cultivar_node <- search_path(wheat_new, \".Simulations.Replacements.Cultivars.Hartog\") cultivar_node$path #> [1] 1 3 1 1"},{"path":"https://rapsimng.bangyou.me/reference/insert_models.html","id":null,"dir":"Reference","previous_headings":"","what":"Insert models into apsimx — insert_models","title":"Insert models into apsimx — insert_models","text":"Insert models apsimx","code":""},{"path":"https://rapsimng.bangyou.me/reference/insert_models.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Insert models into apsimx — insert_models","text":"","code":"insert_models(l, path, models)"},{"path":"https://rapsimng.bangyou.me/reference/insert_models.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Insert models into apsimx — insert_models","text":"l list apsimx file path numeric, path returned search_path search_node. character, path supported apsimx models New models","code":""},{"path":"https://rapsimng.bangyou.me/reference/insert_models.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Insert models into apsimx — insert_models","text":"modified list new value","code":""},{"path":"https://rapsimng.bangyou.me/reference/insert_models.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Insert models into apsimx — insert_models","text":"","code":"wheat <- read_apsimx(system.file(\"extdata/wheat.apsimx\", package = \"rapsimng\")) replacements <- new_model(\"Core.Replacements\") wheat_new <- insert_model(wheat, 1, replacements) replacements_node <- search_path(wheat_new, \".Simulations.Replacements\") replacements_node$path #> [1] 1 3 # Add a cultivar folder under replacements cultivar_folder <- new_model(\"PMF.CultivarFolder\", \"Cultivars\") wheat_new <- insert_model(wheat_new, replacements_node$path, cultivar_folder) cultivar_folder_node <- search_path(wheat_new, \".Simulations.Replacements.Cultivars\") cultivar_folder_node$path #> [1] 1 3 1 # Add an new cultivar cultivar <- new_model(\"PMF.Cultivar\", \"Hartog\") wheat_new <- insert_model(wheat_new, cultivar_folder_node$path, cultivar) cultivar_node <- search_path(wheat_new, \".Simulations.Replacements.Cultivars.Hartog\") cultivar_node$path #> [1] 1 3 1 1"},{"path":"https://rapsimng.bangyou.me/reference/keep_simulations.html","id":null,"dir":"Reference","previous_headings":"","what":"Keep simulations for a factorial experiment — keep_simulations","title":"Keep simulations for a factorial experiment — keep_simulations","text":"Keep simulations factorial experiment","code":""},{"path":"https://rapsimng.bangyou.me/reference/keep_simulations.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Keep simulations for a factorial experiment — keep_simulations","text":"","code":"keep_simulations(l, s)"},{"path":"https://rapsimng.bangyou.me/reference/keep_simulations.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Keep simulations for a factorial experiment — keep_simulations","text":"l list read_apsim Factorial.Permutation root. s list factor name levels value keep. factor kept specified.","code":""},{"path":"https://rapsimng.bangyou.me/reference/keep_simulations.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Keep simulations for a factorial experiment — keep_simulations","text":"new list removed simulations.","code":""},{"path":"https://rapsimng.bangyou.me/reference/keep_simulations.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Keep simulations for a factorial experiment — keep_simulations","text":"","code":"wheat <- read_apsimx(system.file(\"extdata/wheat.apsimx\", package = \"rapsimng\")) permutation <- search_path(wheat, path = \"[Factors].Permutation\") permutation_new <- keep_simulations(permutation$node, list(V = \"2\")) get_simulations(permutation_new) #> $V #> [1] \"2\" #> #> $Cv #> [1] \"Axe\" \"Bolac\" \"Calingiri\" #> #> $N #> [1] \"0\" \"200\" #> permutation_new <- keep_simulations(permutation$node, list(Cv = c(\"Axe\", \"Bolac\"))) get_simulations(permutation_new) #> $V #> [1] \"1\" \"2\" #> #> $Cv #> [1] \"Axe\" \"Bolac\" #> #> $N #> [1] \"0\" \"200\" #> permutation_new <- keep_simulations(permutation$node, list(V = \"1\", Cv = c(\"Axe\", \"Bolac\"))) get_simulations(permutation_new) #> $V #> [1] \"1\" #> #> $Cv #> [1] \"Axe\" \"Bolac\" #> #> $N #> [1] \"0\" \"200\" #>"},{"path":"https://rapsimng.bangyou.me/reference/list_report.html","id":null,"dir":"Reference","previous_headings":"","what":"List all reports in the database — list_report","title":"List all reports in the database — list_report","text":"List reports database","code":""},{"path":"https://rapsimng.bangyou.me/reference/list_report.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"List all reports in the database — list_report","text":"","code":"list_report(file)"},{"path":"https://rapsimng.bangyou.me/reference/list_report.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"List all reports in the database — list_report","text":"file file path apsimx db file","code":""},{"path":"https://rapsimng.bangyou.me/reference/list_report.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"List all reports in the database — list_report","text":"vector reports","code":""},{"path":"https://rapsimng.bangyou.me/reference/list_report.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"List all reports in the database — list_report","text":"","code":"file <- system.file(\"extdata/wheat.apsimx\", package = \"rapsimng\") list_report(file) #> [1] \"HarvestReport\""},{"path":"https://rapsimng.bangyou.me/reference/minimum_apsimng.html","id":null,"dir":"Reference","previous_headings":"","what":"Create the minimum requirements to run an APSIM Next Generation — minimum_apsimng","title":"Create the minimum requirements to run an APSIM Next Generation — minimum_apsimng","text":"Create minimum requirements run APSIM Next Generation","code":""},{"path":"https://rapsimng.bangyou.me/reference/minimum_apsimng.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create the minimum requirements to run an APSIM Next Generation — minimum_apsimng","text":"","code":"minimum_apsimng(install_path, output)"},{"path":"https://rapsimng.bangyou.me/reference/minimum_apsimng.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create the minimum requirements to run an APSIM Next Generation — minimum_apsimng","text":"install_path installed path APSIM Next Generation output output folder","code":""},{"path":"https://rapsimng.bangyou.me/reference/minimum_apsimng.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create the minimum requirements to run an APSIM Next Generation — minimum_apsimng","text":"","code":"if (FALSE) { minimum_apsimng(\"C:/ProgramFiles/APSIMNG\", \"minimum_apsimng\") }"},{"path":"https://rapsimng.bangyou.me/reference/new_model.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a new model — new_model","title":"Create a new model — new_model","text":"Create new model","code":""},{"path":"https://rapsimng.bangyou.me/reference/new_model.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a new model — new_model","text":"","code":"new_model(model, name = model)"},{"path":"https://rapsimng.bangyou.me/reference/new_model.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a new model — new_model","text":"model name new model name new name","code":""},{"path":"https://rapsimng.bangyou.me/reference/new_model.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a new model — new_model","text":"","code":"new_model(model = \"PMF.Cultivar\") #> $`$type` #> [1] \"Models.PMF.Cultivar, Models\" #> #> $Name #> [1] \"Cultivar\" #> #> $Children #> list() #> #> $IncludeInDocumentation #> [1] TRUE #> #> $Enabled #> [1] TRUE #> #> $ReadOnly #> [1] FALSE #> #> $Alias #> list() #> #> $Command #> list() #> new_model(model = \"PMF.Cultivar\", name = \"example\") #> $`$type` #> [1] \"Models.PMF.Cultivar, Models\" #> #> $Name #> [1] \"example\" #> #> $Children #> list() #> #> $IncludeInDocumentation #> [1] TRUE #> #> $Enabled #> [1] TRUE #> #> $ReadOnly #> [1] FALSE #> #> $Alias #> list() #> #> $Command #> list() #>"},{"path":"https://rapsimng.bangyou.me/reference/read_apsimx.html","id":null,"dir":"Reference","previous_headings":"","what":"Read APSIMX file — read_apsimx","title":"Read APSIMX file — read_apsimx","text":"Read APSIMX file","code":""},{"path":"https://rapsimng.bangyou.me/reference/read_apsimx.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read APSIMX file — read_apsimx","text":"","code":"read_apsimx(path)"},{"path":"https://rapsimng.bangyou.me/reference/read_apsimx.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read APSIMX file — read_apsimx","text":"path file path URL apsimx file","code":""},{"path":"https://rapsimng.bangyou.me/reference/read_apsimx.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read APSIMX file — read_apsimx","text":"list object apsimx file","code":""},{"path":"https://rapsimng.bangyou.me/reference/read_apsimx.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Read APSIMX file — read_apsimx","text":"","code":"file <- system.file(\"extdata/wheat.apsimx\", package = \"rapsimng\") m <- read_apsimx(file)"},{"path":"https://rapsimng.bangyou.me/reference/read_report.html","id":null,"dir":"Reference","previous_headings":"","what":"Read apsimx database in db file format — read_report","title":"Read apsimx database in db file format — read_report","text":"Read apsimx database db file format","code":""},{"path":"https://rapsimng.bangyou.me/reference/read_report.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read apsimx database in db file format — read_report","text":"","code":"read_report(file, report)"},{"path":"https://rapsimng.bangyou.me/reference/read_report.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read apsimx database in db file format — read_report","text":"file file path apsimx db file report report name","code":""},{"path":"https://rapsimng.bangyou.me/reference/read_report.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read apsimx database in db file format — read_report","text":"data.frame report","code":""},{"path":"https://rapsimng.bangyou.me/reference/read_report.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Read apsimx database in db file format — read_report","text":"","code":"file <- system.file(\"extdata/wheat.apsimx\", package = \"rapsimng\") read_report(file, \"HarvestReport\") #> # A tibble: 12 × 15 #> CheckpointID SimulationID Experiment FolderName V Cv N Zone #> #> 1 1 1 Experiment Folder 1 Axe 0 Field #> 2 1 4 Experiment Folder 2 Axe 0 Field #> 3 1 2 Experiment Folder 1 Calingiri 0 Field #> 4 1 6 Experiment Folder 1 Axe 200 Field #> 5 1 3 Experiment Folder 1 Bolac 0 Field #> 6 1 5 Experiment Folder 2 Calingiri 0 Field #> 7 1 7 Experiment Folder 2 Bolac 0 Field #> 8 1 9 Experiment Folder 1 Bolac 200 Field #> 9 1 8 Experiment Folder 2 Bolac 200 Field #> 10 1 10 Experiment Folder 2 Axe 200 Field #> 11 1 12 Experiment Folder 1 Calingiri 200 Field #> 12 1 11 Experiment Folder 2 Calingiri 200 Field #> # ℹ 7 more variables: Clock.Today , Wheat.Phenology.Stage , #> # Wheat.Phenology.Zadok.Stage , Wheat.Phenology.FloweringDAS , #> # Wheat.Phenology.FlagLeafDAS , #> # Wheat.Phenology.TerminalSpikeletDAS , Name "},{"path":"https://rapsimng.bangyou.me/reference/remove_model.html","id":null,"dir":"Reference","previous_headings":"","what":"Remove a model with new values — remove_model","title":"Remove a model with new values — remove_model","text":"Remove model new values","code":""},{"path":"https://rapsimng.bangyou.me/reference/remove_model.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Remove a model with new values — remove_model","text":"","code":"remove_model(l, path)"},{"path":"https://rapsimng.bangyou.me/reference/remove_model.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Remove a model with new values — remove_model","text":"l list apsimx file path numeric, path returned search_path search_node. character, path supported apsimx","code":""},{"path":"https://rapsimng.bangyou.me/reference/remove_model.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Remove a model with new values — remove_model","text":"modified list new value","code":""},{"path":"https://rapsimng.bangyou.me/reference/remove_model.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Remove a model with new values — remove_model","text":"","code":"wheat <- read_apsimx(system.file(\"extdata/Wheat.json\", package = \"rapsimng\")) a <- search_path(wheat, '[Wheat].Phenology.ThermalTime') wheat_new <- remove_model(wheat, a$path) b <- search_path(wheat_new, '[Wheat].Phenology.ThermalTime') b #> list()"},{"path":"https://rapsimng.bangyou.me/reference/replace_model.html","id":null,"dir":"Reference","previous_headings":"","what":"Replace a model with new values — replace_model","title":"Replace a model with new values — replace_model","text":"Replace model new values","code":""},{"path":"https://rapsimng.bangyou.me/reference/replace_model.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Replace a model with new values — replace_model","text":"","code":"replace_model(l, path, model)"},{"path":"https://rapsimng.bangyou.me/reference/replace_model.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Replace a model with new values — replace_model","text":"l list apsimx file path numeric, path returned search_path search_node. character, path supported apsimx model new model","code":""},{"path":"https://rapsimng.bangyou.me/reference/replace_model.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Replace a model with new values — replace_model","text":"modified list new value","code":""},{"path":"https://rapsimng.bangyou.me/reference/replace_model.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Replace a model with new values — replace_model","text":"","code":"wheat <- read_apsimx(system.file(\"extdata/Wheat.json\", package = \"rapsimng\")) a <- search_path(wheat, '[Wheat].Phenology.ThermalTime') a$node$Children[[1]]$X[[2]] <- 27 wheat_new <- replace_model(wheat, a$path, a$node) b <- search_path(wheat_new, '[Wheat].Phenology.ThermalTime') b$node$Children[[1]]$X #> [[1]] #> [1] 0 #> #> [[2]] #> [1] 27 #> #> [[3]] #> [1] 37 #>"},{"path":"https://rapsimng.bangyou.me/reference/run_models.html","id":null,"dir":"Reference","previous_headings":"","what":"Run apsimx file using Models.exe — run_models","title":"Run apsimx file using Models.exe — run_models","text":"Run apsimx file using Models.exe","code":""},{"path":"https://rapsimng.bangyou.me/reference/run_models.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Run apsimx file using Models.exe — run_models","text":"","code":"run_models( models_exe, path, pattern = NULL, recurse = FALSE, csv = FALSE, parallel = NULL, ncpus = NULL, verbose = FALSE )"},{"path":"https://rapsimng.bangyou.me/reference/run_models.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Run apsimx file using Models.exe — run_models","text":"models_exe path Models.exe path path .apsimx file. May include wildcard. pattern Use filter simulation names run. recurse Recursively search subdirectories files matching ApsimXFileSpec. FALSE default. csv Export reports .csv files. FALSE default. parallel Use multi-process job runner. FALSE, use single threaded; TRUE, use multi-process job runner ncpus Set number processors use. processes default verbose Write messages StdOut simulation starts/finishes. effect running directory .apsimx files (*.apsimx).","code":""},{"path":"https://rapsimng.bangyou.me/reference/search_node.html","id":null,"dir":"Reference","previous_headings":"","what":"Find element(s) in apsimx file — search_node","title":"Find element(s) in apsimx file — search_node","text":"Find element(s) apsimx file","code":""},{"path":"https://rapsimng.bangyou.me/reference/search_node.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find element(s) in apsimx file — search_node","text":"","code":"search_node(l, all = FALSE, max_depth = 1e+06, case_insensitive = TRUE, ...)"},{"path":"https://rapsimng.bangyou.me/reference/search_node.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find element(s) in apsimx file — search_node","text":"l list apsimx file Whether find elements max_depth maximum depth search case_insensitive Whether case sensitive ... names arguments property match","code":""},{"path":"https://rapsimng.bangyou.me/reference/search_node.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find element(s) in apsimx file — search_node","text":"list matching criteria equals TRUE, list node path equals FALSE (default)","code":""},{"path":"https://rapsimng.bangyou.me/reference/search_node.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find element(s) in apsimx file — search_node","text":"","code":"wheat <- read_apsimx(system.file(\"extdata/Wheat.json\", package = \"rapsimng\")) # Return empty list if not found search_node(wheat, Name = \"Simulations1\") #> list() # Find root level a <- search_node(wheat, Name = \"Simulations\") a$path #> [1] 1 # Find sub-level a <- search_node(wheat, Name = \"Wheat\") a$path #> [1] 1 1 a <- search_node(wheat, `$type` = \"Models.PMF.Cultivar, Models\") a$path #> [1] 1 1 5 1 # Find multiple attributes a <- search_node(wheat, Name = 'PotentialBranchingRate', `$type` = \"Models.Functions.PhaseLookup, Models\") a$path #> [1] 1 1 4 1 1 a$node$Name #> [1] \"PotentialBranchingRate\" # Find all cultivar nodes a <- search_node(wheat, `$type` = \"Models.PMF.Cultivar, Models\", all = TRUE) length(a) #> [1] 5"},{"path":"https://rapsimng.bangyou.me/reference/search_path.html","id":null,"dir":"Reference","previous_headings":"","what":"Find a model in the apsimx file using specified path — search_path","title":"Find a model in the apsimx file using specified path — search_path","text":"Find model apsimx file using specified path","code":""},{"path":"https://rapsimng.bangyou.me/reference/search_path.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find a model in the apsimx file using specified path — search_path","text":"","code":"search_path(l, path, case_insensitive = TRUE)"},{"path":"https://rapsimng.bangyou.me/reference/search_path.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find a model in the apsimx file using specified path — search_path","text":"l list apsimx file path specified path (See details) case_insensitive Whether case sensitive","code":""},{"path":"https://rapsimng.bangyou.me/reference/search_path.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find a model in the apsimx file using specified path — search_path","text":"list specified path.","code":""},{"path":"https://rapsimng.bangyou.me/reference/search_path.html","id":"absolute-paths","dir":"Reference","previous_headings":"","what":"Absolute Paths","title":"Find a model in the apsimx file using specified path — search_path","text":"Absolute paths leading ‘.’ e.g. .Simulations.Test.Clock - absolute path - refers clock model 'Test' simulation.","code":""},{"path":"https://rapsimng.bangyou.me/reference/search_path.html","id":"scoped-paths","dir":"Reference","previous_headings":"","what":"Scoped Paths","title":"Find a model in the apsimx file using specified path — search_path","text":"Scoped paths leading model type square brackets. model specified name, scope, located applying rest path. [Soil].Water - scoped path - refers Water model child model name 'Soil' scope","code":""},{"path":"https://rapsimng.bangyou.me/reference/search_path.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find a model in the apsimx file using specified path — search_path","text":"","code":"wheat <- read_apsimx(system.file(\"extdata/Wheat.json\", package = \"rapsimng\")) # Return empty list if not found search_path(wheat, \"[Simulations1]\") #> list() # Search root path a <- search_path(wheat, '.Simulations') a$path #> [1] 1 a$node$Name #> [1] \"Simulations\" # Level one a <- search_path(wheat, '.Simulations.Wheat1') a$path #> NULL a$node$Name #> NULL # Level two a <- search_path(wheat, '.Simulations.Wheat') a$path #> [1] 1 1 a$node$Name #> [1] \"Wheat\" # Level three a <- search_path(wheat, '.Simulations.Wheat.BranchingRate') a$path #> NULL a$node$Name #> NULL a <- search_path(wheat, '.Simulations.Wheat.Structure') a$path #> [1] 1 1 4 a$node$Name #> [1] \"Structure\" # Level four a <- search_path(wheat, '.Simulations.Wheat.Structure.BranchingRate') a$path #> [1] 1 1 4 1 a$node$Name #> [1] \"BranchingRate\" a <- search_path(wheat, '.Simulations.Wheat.Structure.BranchingRate1') a$path #> NULL a$node$Name #> NULL # scoped # Root path a <- search_path(wheat, '[Simulations1]') a <- search_path(wheat, '[Simulations]') a$path #> [1] 1 a$node$Name #> [1] \"Simulations\" # Level two a <- search_path(wheat, '[Simulations].Wheat1') a <- search_path(wheat, '[Simulations1].Wheat') a$path #> NULL a$node$Name #> NULL a <- search_path(wheat, '[Whea]') a <- search_path(wheat, '[Wheat]') a$path #> [1] 1 1 a$node$Name #> [1] \"Wheat\" # Level three a <- search_path(wheat, '[Wheat].BranchingRate') a <- search_path(wheat, '[Wheat].Structure') a$path #> [1] 1 1 4 a$node$Name #> [1] \"Structure\" a <- search_path(wheat, '[Structure]') a$path #> [1] 1 1 4 a$node$Name #> [1] \"Structure\" # Level four a <- search_path(wheat, '[Structure].BranchingRate') a$path #> [1] 1 1 4 1 a$node$Name #> [1] \"BranchingRate\" a <- search_path(wheat, '[Structure].BranchingRate1') a <- search_path(wheat, '[Structure1].BranchingRate')"},{"path":"https://rapsimng.bangyou.me/reference/set_parameter_value.html","id":null,"dir":"Reference","previous_headings":"","what":"Set a parameter with a new value — set_parameter_value","title":"Set a parameter with a new value — set_parameter_value","text":"Set parameter new value","code":""},{"path":"https://rapsimng.bangyou.me/reference/set_parameter_value.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set a parameter with a new value — set_parameter_value","text":"","code":"set_parameter_value(l, parameter, value)"},{"path":"https://rapsimng.bangyou.me/reference/set_parameter_value.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set a parameter with a new value — set_parameter_value","text":"l list apsimx file parameter name parameter APSIM NG specification value new value","code":""},{"path":"https://rapsimng.bangyou.me/reference/set_parameter_value.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set a parameter with a new value — set_parameter_value","text":"list replaced value","code":""},{"path":"https://rapsimng.bangyou.me/reference/set_parameter_value.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Set a parameter with a new value — set_parameter_value","text":"","code":"wheat <- read_apsimx(system.file(\"extdata/Wheat.json\", package = \"rapsimng\")) new_wheat <- set_parameter_value(wheat, \"[Structure].BranchingRate.PotentialBranchingRate.Reproductive.Zero.FixedValue\", 1) new_wheat2 <- search_path(new_wheat, \"[Structure].BranchingRate.PotentialBranchingRate.Reproductive.Zero\") new_wheat2$node$FixedValue #> [1] 1 new_wheat <- set_parameter_value( wheat, \"[Structure].HeightModel.WaterStress.XYPairs.Y\", \"0.1,1.1\") new_wheat2 <- search_path(new_wheat, \"[Structure].HeightModel.WaterStress.XYPairs\") new_wheat2$node$Y #> [[1]] #> [1] \"0.1\" #> #> [[2]] #> [1] \"1.1\" #>"},{"path":"https://rapsimng.bangyou.me/reference/test_apsimx.html","id":null,"dir":"Reference","previous_headings":"","what":"Test whether all files under published folder of apsimx are required — test_apsimx","title":"Test whether all files under published folder of apsimx are required — test_apsimx","text":"Test whether files published folder apsimx required","code":""},{"path":"https://rapsimng.bangyou.me/reference/test_apsimx.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test whether all files under published folder of apsimx are required — test_apsimx","text":"","code":"test_apsimx(base, example)"},{"path":"https://rapsimng.bangyou.me/reference/test_apsimx.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test whether all files under published folder of apsimx are required — test_apsimx","text":"base base folder path apsimx publish example example apsimx file","code":""},{"path":"https://rapsimng.bangyou.me/reference/test_apsimx.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Test whether all files under published folder of apsimx are required — test_apsimx","text":"vector required files","code":""},{"path":"https://rapsimng.bangyou.me/reference/update_cultivar.html","id":null,"dir":"Reference","previous_headings":"","what":"Title Update the cultivar parameters — update_cultivar","title":"Title Update the cultivar parameters — update_cultivar","text":"function assumes file apsimx format. new Replacements node added exist. existing cultivar parameters updated. New cultivar created.","code":""},{"path":"https://rapsimng.bangyou.me/reference/update_cultivar.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Title Update the cultivar parameters — update_cultivar","text":"","code":"update_cultivar( l, df, add = TRUE, use_folder = TRUE, cultivar_folder = \"Cultivars\" )"},{"path":"https://rapsimng.bangyou.me/reference/update_cultivar.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Title Update the cultivar parameters — update_cultivar","text":"l list apsimx file df data frame new parameters three columns, .e. name, parameter value. add Whether add extra nodes (e.g. replacements, Cultivars folder new cultivar) use_folder use cultivar folder add new cultivars cultivar_folder folder name cultivars","code":""},{"path":"https://rapsimng.bangyou.me/reference/update_cultivar.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Title Update the cultivar parameters — update_cultivar","text":"modified apsimx file","code":""},{"path":"https://rapsimng.bangyou.me/reference/update_cultivar.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Title Update the cultivar parameters — update_cultivar","text":"","code":"wheat <- read_apsimx(system.file(\"extdata/wheat.apsimx\", package = \"rapsimng\")) # Update cultivars df <- data.frame(name = rep(\"Hartog\", 3), parameter = c(\"[Phenology].MinimumLeafNumber.FixedValue\", \"[Phenology].VrnSensitivity.FixedValue\", \"[Phenology].PpSensitivity.FixedValue\"), value = c(9, 7, 3)) wheat_cultivar <- update_cultivar(wheat, df) hartog <- search_path(wheat_cultivar, \"[Replacements].Hartog\") hartog$path #> NULL"},{"path":"https://rapsimng.bangyou.me/reference/write_apsimx.html","id":null,"dir":"Reference","previous_headings":"","what":"Write APSIMX file — write_apsimx","title":"Write APSIMX file — write_apsimx","text":"Write APSIMX file","code":""},{"path":"https://rapsimng.bangyou.me/reference/write_apsimx.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Write APSIMX file — write_apsimx","text":"","code":"write_apsimx(l, file)"},{"path":"https://rapsimng.bangyou.me/reference/write_apsimx.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Write APSIMX file — write_apsimx","text":"l list apsimx file file file path apsimx file","code":""},{"path":"https://rapsimng.bangyou.me/reference/write_apsimx.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Write APSIMX file — write_apsimx","text":"list object apsimx file","code":""},{"path":"https://rapsimng.bangyou.me/news/index.html","id":"rapsimng-010","dir":"Changelog","previous_headings":"","what":"RApsimNG 0.1.0","title":"RApsimNG 0.1.0","text":"CRAN release: 2020-10-13 first release RApsimNG.","code":""},{"path":"https://rapsimng.bangyou.me/news/index.html","id":"rapsimng-020","dir":"Changelog","previous_headings":"","what":"RApsimNG 0.2.0","title":"RApsimNG 0.2.0","text":"CRAN release: 2021-03-30 New functions walk json tree New functions manipulate simulations (list, keep drop simulations) New functions set parameter value path Several bug fixes","code":""},{"path":"https://rapsimng.bangyou.me/news/index.html","id":"rapsimng-030","dir":"Changelog","previous_headings":"","what":"RApsimNG 0.3.0","title":"RApsimNG 0.3.0","text":"CRAN release: 2021-09-09 Several bug fixes","code":""},{"path":"https://rapsimng.bangyou.me/news/index.html","id":"rapsimng-042","dir":"Changelog","previous_headings":"","what":"RApsimNG 0.4.2","title":"RApsimNG 0.4.2","text":"Several bug fixes Update new version APSIM NG Update update_cultivar add new cultivar parameters","code":""}] +[{"path":"https://rapsimng.bangyou.me/CODE_OF_CONDUCT.html","id":null,"dir":"","previous_headings":"","what":"Contributor Code of Conduct","title":"Contributor Code of Conduct","text":"contributors maintainers project, pledge respect people contribute reporting issues, posting feature requests, updating documentation, submitting pull requests patches, activities. committed making participation project harassment-free experience everyone, regardless level experience, gender, gender identity expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion. Examples unacceptable behavior participants include use sexual language imagery, derogatory comments personal attacks, trolling, public private harassment, insults, unprofessional conduct. Project maintainers right responsibility remove, edit, reject comments, commits, code, wiki edits, issues, contributions aligned Code Conduct. Project maintainers follow Code Conduct may removed project team. Instances abusive, harassing, otherwise unacceptable behavior may reported opening issue contacting one project maintainers. Code Conduct adapted Contributor Covenant (http://contributor-covenant.org), version 1.0.0, available http://contributor-covenant.org/version/1/0/0/","code":""},{"path":"https://rapsimng.bangyou.me/articles/modify.html","id":"read-apsimx-file","dir":"Articles","previous_headings":"","what":"Read apsimx file","title":"Modify apsimx file","text":"read_apsimx used read files apsimx json format, .e. *.apsimx simulations *.json model resource.","code":"library(rapsimng) wheat <- read_apsimx(system.file(\"extdata/Wheat.json\", package = \"rapsimng\")) #wheat <- read_apsimx(\"inst/Wheat.json\")"},{"path":"https://rapsimng.bangyou.me/articles/modify.html","id":"modify-existing-model","dir":"Articles","previous_headings":"","what":"Modify existing model","title":"Modify apsimx file","text":"existing model can replaced removed. example shows update critical thermal remove .","code":"# Find the ThermalTime model a <- search_path(wheat, '[Wheat].Phenology.ThermalTime') a$node$Children[[1]]$X[[2]] #> [1] 26 # Update the optimum temperature a$node$Children[[1]]$X[[2]] <- 27 # Replace with new value wheat_new <- replace_model(wheat, a$path, a$node) b <- search_path(wheat_new, '[Wheat].Phenology.ThermalTime') # The optimum temperature should be updated now b$node$Children[[1]]$X[[2]] #> [1] 27 # The ThermalTime model can also be removed a <- search_path(wheat, '[Wheat].Phenology.ThermalTime') wheat_new <- remove_model(wheat, a$path) b <- search_path(wheat_new, '[Wheat].Phenology.ThermalTime') # The ThermalTime model should not be found now (i.e. Empty list) b #> list()"},{"path":"https://rapsimng.bangyou.me/articles/modify.html","id":"create-new-model","dir":"Articles","previous_headings":"","what":"Create new model","title":"Modify apsimx file","text":"Function new_model used generate required elements new model, e.g. createing new cultivar Hartog Command can updated specify new parameter values. Finally new cultivar can inserted apsimx file.","code":"new_cultivar <- new_model(\"PMF.Cultivar\", name = \"Hartog\") new_cultivar #> $`$type` #> [1] \"Models.PMF.Cultivar, Models\" #> #> $Name #> [1] \"Hartog\" #> #> $Children #> list() #> #> $IncludeInDocumentation #> [1] TRUE #> #> $Enabled #> [1] TRUE #> #> $ReadOnly #> [1] FALSE #> #> $Alias #> list() #> #> $Command #> list() new_cultivar$Command <- list( \"[Phenology].MinimumLeafNumber.FixedValue = 6\", \"[Phenology].VrnSensitivity.FixedValue = 0\") # Read the apsimx file wheat <- read_apsimx(system.file(\"extdata/wheat.apsimx\", package = \"rapsimng\")) # Create a new Replacements replacements <- new_model(\"Core.Replacements\") # Insert the replacements into root folder wheat_new <- insert_model(wheat, 1, replacements) replacements_node <- search_path(wheat_new, \".Simulations.Replacements\") replacements_node$path #> [1] 1 3 # Insert the new cultivar wheat_new <- insert_model(wheat_new, replacements_node$path, new_cultivar) # Check the new cultivar cultivar_node <- search_path(wheat_new, \".Simulations.Replacements.Hartog\") cultivar_node$path #> [1] 1 3 1 cultivar_node$node$Command #> [[1]] #> [1] \"[Phenology].MinimumLeafNumber.FixedValue = 6\" #> #> [[2]] #> [1] \"[Phenology].VrnSensitivity.FixedValue = 0\""},{"path":"https://rapsimng.bangyou.me/articles/modify.html","id":"available-models","dir":"Articles","previous_headings":"Create new model","what":"Available models","title":"Modify apsimx file","text":"new model can generated R according Models assemble APSIM Next Generation. rapsimng package stores copy Models.xml APSIM Next Generation 1st August, 2020. available models can listed using function available_models.","code":"head(data.frame(model = available_models())) #> model #> 1 AgPasture.AGPBiomass #> 2 AgPasture.BiomassAndN #> 3 AgPasture.BiomassAndNLayered #> 4 AgPasture.TissuesHelper #> 5 AgPasture.SimpleGrazing #> 6 AgPasture.SimpleGrazing.GrazingRotationTypeEnum"},{"path":"https://rapsimng.bangyou.me/articles/modify.html","id":"update-cultivar-parameter-values","dir":"Articles","previous_headings":"","what":"Update cultivar parameter values","title":"Modify apsimx file","text":"Function update_cultivar short way update parameter values cultivars.","code":"wheat <- read_apsimx(system.file(\"extdata/wheat.apsimx\", package = \"rapsimng\")) # Update cultivars df <- data.frame(name = rep(\"Hartog\", 3), parameter = c(\"[Phenology].MinimumLeafNumber.FixedValue\", \"[Phenology].VrnSensitivity.FixedValue\", \"[Phenology].PpSensitivity.FixedValue\"), value = c(9, 7, 3)) wheat_cultivar <- update_cultivar(wheat, df) # Check update cultivar paramters hartog <- search_path(wheat_cultivar, \"[Replacements].Hartog\") hartog$path #> NULL"},{"path":"https://rapsimng.bangyou.me/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Bangyou Zheng. Author, maintainer.","code":""},{"path":"https://rapsimng.bangyou.me/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Zheng B (2024). rapsimng: APSIM Next Generation. R package version 0.4.2, https://github.com/byzheng/rapsimng, https://rapsimng.bangyou./.","code":"@Manual{, title = {rapsimng: APSIM Next Generation}, author = {Bangyou Zheng}, year = {2024}, note = {R package version 0.4.2, https://github.com/byzheng/rapsimng}, url = {https://rapsimng.bangyou.me/}, }"},{"path":"https://rapsimng.bangyou.me/index.html","id":"rapsimng","dir":"","previous_headings":"","what":"APSIM Next Generation","title":"APSIM Next Generation","text":"rapsimng package designed modify run *.apsimx simulations using R APSIM Next Generation.","code":""},{"path":"https://rapsimng.bangyou.me/index.html","id":"features","dir":"","previous_headings":"","what":"Features","title":"APSIM Next Generation","text":"Find elements *.apsimx file","code":""},{"path":"https://rapsimng.bangyou.me/index.html","id":"installation","dir":"","previous_headings":"","what":"Installation","title":"APSIM Next Generation","text":"Install CRAN. Install developing version Github.","code":"install.packages('rapsimng') remotes::install_github('byzheng/rapsimng')"},{"path":"https://rapsimng.bangyou.me/index.html","id":"read-apsimx-file","dir":"","previous_headings":"","what":"Read APSIMX file","title":"APSIM Next Generation","text":"wheat.apsimx validation dataset APSIM NG used example. Function read_apsimx used read *.apsimx file jsonlite::read_json returns list.","code":"# Read Wheat.apsimx file with `read_apsimx` which returns a list of json results. file <- system.file(\"extdata/wheat.apsimx\", package = \"rapsimng\") m <- read_apsimx(file)"},{"path":"https://rapsimng.bangyou.me/index.html","id":"search-by-of-apsim-ng","dir":"","previous_headings":"","what":"Search by of APSIM NG","title":"APSIM Next Generation","text":"node apsimx file can found using path specification APSIM NG.","code":"potential <- search_path(m, path = '[Structure].BranchingRate.PotentialBranchingRate.Vegetative.PotentialBranchingRate') potential"},{"path":"https://rapsimng.bangyou.me/index.html","id":"modify-a-found-model","dir":"","previous_headings":"","what":"Modify a found model","title":"APSIM Next Generation","text":"","code":"new_model <- potential$node new_model$XProperty <- 'NewVariable'"},{"path":"https://rapsimng.bangyou.me/index.html","id":"replace-the-new-model","dir":"","previous_headings":"","what":"Replace the new model","title":"APSIM Next Generation","text":"","code":"new <- replace_model(m, potential$path, new_model)"},{"path":"https://rapsimng.bangyou.me/index.html","id":"save-into-a-new-apsimx-file","dir":"","previous_headings":"","what":"Save into a new apsimx file","title":"APSIM Next Generation","text":"","code":"write_apsimx(new, tempfile(fileext = '.json'))"},{"path":"https://rapsimng.bangyou.me/index.html","id":"run-apsimx-file","dir":"","previous_headings":"","what":"Run apsimx file","title":"APSIM Next Generation","text":"function run_models wrapped APSIM NG Models.exe command line can called run apsimx files. See APSIM website documentation.","code":""},{"path":"https://rapsimng.bangyou.me/reference/append_model.html","id":null,"dir":"Reference","previous_headings":"","what":"append a model into apsimx — append_model","title":"append a model into apsimx — append_model","text":"append model apsimx","code":""},{"path":"https://rapsimng.bangyou.me/reference/append_model.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"append a model into apsimx — append_model","text":"","code":"append_model(l, path, model)"},{"path":"https://rapsimng.bangyou.me/reference/append_model.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"append a model into apsimx — append_model","text":"l list apsimx file path numeric, path returned search_path search_node. character, path supported apsimx model new model list new models","code":""},{"path":"https://rapsimng.bangyou.me/reference/append_model.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"append a model into apsimx — append_model","text":"modified list new value","code":""},{"path":"https://rapsimng.bangyou.me/reference/append_model.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"append a model into apsimx — append_model","text":"","code":"wheat <- read_apsimx(system.file(\"extdata/wheat.apsimx\", package = \"rapsimng\")) replacements <- new_model(\"Core.Replacements\") wheat_new <- insert_model(wheat, 1, replacements) replacements_node <- search_path(wheat_new, \".Simulations.Replacements\") replacements_node$path #> [1] 1 3 # Add a cultivar folder under replacements cultivar_folder <- new_model(\"PMF.CultivarFolder\", \"Cultivars\") wheat_new <- insert_model(wheat_new, replacements_node$path, cultivar_folder) cultivar_folder_node <- search_path(wheat_new, \".Simulations.Replacements.Cultivars\") cultivar_folder_node$path #> [1] 1 3 1 # Add an new cultivar cultivar <- new_model(\"PMF.Cultivar\", \"Hartog\") wheat_new <- insert_model(wheat_new, cultivar_folder_node$path, cultivar) cultivar_node <- search_path(wheat_new, \".Simulations.Replacements.Cultivars.Hartog\") cultivar_node$path #> [1] 1 3 1 1 # Append another cultivar cultivar2 <- new_model(\"PMF.Cultivar\", \"Axe\") wheat_new <- append_model(wheat_new, cultivar_node$path, list(cultivar2)) cultivar2_node <- search_path(wheat_new, \".Simulations.Replacements.Cultivars.Axe\") cultivar2_node$path #> [1] 1 3 1 2"},{"path":"https://rapsimng.bangyou.me/reference/available_models.html","id":null,"dir":"Reference","previous_headings":"","what":"List all available models in APSIM NG — available_models","title":"List all available models in APSIM NG — available_models","text":"List available models APSIM NG","code":""},{"path":"https://rapsimng.bangyou.me/reference/available_models.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"List all available models in APSIM NG — available_models","text":"","code":"available_models()"},{"path":"https://rapsimng.bangyou.me/reference/available_models.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"List all available models in APSIM NG — available_models","text":"character vector available models","code":""},{"path":"https://rapsimng.bangyou.me/reference/available_models.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"List all available models in APSIM NG — available_models","text":"","code":"a <- available_models() a[1:10] #> [1] \"AgPasture.AGPBiomass\" #> [2] \"AgPasture.BiomassAndN\" #> [3] \"AgPasture.BiomassAndNLayered\" #> [4] \"AgPasture.TissuesHelper\" #> [5] \"AgPasture.SimpleGrazing\" #> [6] \"AgPasture.SimpleGrazing.GrazingRotationTypeEnum\" #> [7] \"AgPasture.SimpleGrazing.UrineReturnType\" #> [8] \"AgPasture.PastureSpecies\" #> [9] \"AgPasture.PastureSpecies.BiomassRemovedDelegate\" #> [10] \"AgPasture.PastureSpecies.YesNoAnswer\""},{"path":"https://rapsimng.bangyou.me/reference/disable_models.html","id":null,"dir":"Reference","previous_headings":"","what":"Disable models in apsimx — disable_models","title":"Disable models in apsimx — disable_models","text":"Disable models apsimx","code":""},{"path":"https://rapsimng.bangyou.me/reference/disable_models.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Disable models in apsimx — disable_models","text":"","code":"disable_models(l, paths)"},{"path":"https://rapsimng.bangyou.me/reference/disable_models.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Disable models in apsimx — disable_models","text":"l list apsimx file paths numeric, path returned search_path search_node. character, path supported apsimx","code":""},{"path":"https://rapsimng.bangyou.me/reference/disable_models.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Disable models in apsimx — disable_models","text":"modified list new value","code":""},{"path":"https://rapsimng.bangyou.me/reference/disable_models.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Disable models in apsimx — disable_models","text":"","code":"wheat <- read_apsimx(system.file(\"extdata/Wheat.json\", package = \"rapsimng\")) a <- disable_models(wheat, '[Wheat].Phenology.ThermalTime')"},{"path":"https://rapsimng.bangyou.me/reference/get_cultivar.html","id":null,"dir":"Reference","previous_headings":"","what":"Get all cultivar parameters in a model — get_cultivar","title":"Get all cultivar parameters in a model — get_cultivar","text":"Get cultivar parameters model","code":""},{"path":"https://rapsimng.bangyou.me/reference/get_cultivar.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get all cultivar parameters in a model — get_cultivar","text":"","code":"get_cultivar(l, alias = TRUE)"},{"path":"https://rapsimng.bangyou.me/reference/get_cultivar.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get all cultivar parameters in a model — get_cultivar","text":"l list apsimx file alias Whether export alias","code":""},{"path":"https://rapsimng.bangyou.me/reference/get_cultivar.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get all cultivar parameters in a model — get_cultivar","text":"data frame cultivar parameters","code":""},{"path":"https://rapsimng.bangyou.me/reference/get_cultivar.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get all cultivar parameters in a model — get_cultivar","text":"","code":"wheat <- read_apsimx(system.file(\"extdata/Wheat.json\", package = \"rapsimng\")) get_cultivar(wheat) #> name parameter value #> 1 Cul1 [Phenology].MinimumLeafNumber.FixedValue 1 #> 2 Cul1 [Phenology].VrnSensitivity.FixedValue 0 #> 3 Cul1 [Phenology].PpSensitivity.FixedValue 2 #> 4 Cul1 [Phenology].HeadEmergencePpSensitivity.FixedValue 0 #> 5 Cul1 [Phenology].Phyllochron.BasePhyllochron.FixedValue 100 #> 6 Cul6 [Phenology].MinimumLeafNumber.FixedValue 1 #> 7 Cul6 [Phenology].VrnSensitivity.FixedValue 0 #> 8 Cul6 [Phenology].PpSensitivity.FixedValue 2 #> 9 Cul6 [Phenology].HeadEmergencePpSensitivity.FixedValue 0 #> 10 Cul6 [Phenology].Phyllochron.BasePhyllochron.FixedValue 100 #> 11 Cul2 [Phenology].MinimumLeafNumber.FixedValue 1 #> 12 Cul2 [Phenology].VrnSensitivity.FixedValue 0 #> 13 Cul2 [Phenology].PpSensitivity.FixedValue 2 #> 14 Cul2 [Phenology].HeadEmergencePpSensitivity.FixedValue 0 #> 15 Cul2 [Phenology].Phyllochron.BasePhyllochron.FixedValue 100 #> 16 Cul3 [Phenology].MinimumLeafNumber.FixedValue 1 #> 17 Cul3 [Phenology].VrnSensitivity.FixedValue 0 #> 18 Cul3 [Phenology].PpSensitivity.FixedValue 2 #> 19 Cul3 [Phenology].HeadEmergencePpSensitivity.FixedValue 0 #> 20 Cul3 [Phenology].Phyllochron.BasePhyllochron.FixedValue 100 #> 21 Cul4 [Phenology].MinimumLeafNumber.FixedValue 1 #> 22 Cul4 [Phenology].VrnSensitivity.FixedValue 0 #> 23 Cul4 [Phenology].PpSensitivity.FixedValue 2 #> 24 Cul4 [Phenology].HeadEmergencePpSensitivity.FixedValue 0 #> 25 Cul4 [Phenology].Phyllochron.BasePhyllochron.FixedValue 100 #> 26 Cul5 [Phenology].MinimumLeafNumber.FixedValue 1 #> 27 Cul5 [Phenology].VrnSensitivity.FixedValue 0 #> 28 Cul5 [Phenology].PpSensitivity.FixedValue 2 #> 29 Cul5 [Phenology].HeadEmergencePpSensitivity.FixedValue 0 #> 30 Cul5 [Phenology].Phyllochron.BasePhyllochron.FixedValue 100 get_cultivar(wheat, alias = FALSE) #> name parameter value #> 1 Cul1 [Phenology].MinimumLeafNumber.FixedValue 1 #> 2 Cul1 [Phenology].VrnSensitivity.FixedValue 0 #> 3 Cul1 [Phenology].PpSensitivity.FixedValue 2 #> 4 Cul1 [Phenology].HeadEmergencePpSensitivity.FixedValue 0 #> 5 Cul1 [Phenology].Phyllochron.BasePhyllochron.FixedValue 100 #> 6 Cul2 [Phenology].MinimumLeafNumber.FixedValue 1 #> 7 Cul2 [Phenology].VrnSensitivity.FixedValue 0 #> 8 Cul2 [Phenology].PpSensitivity.FixedValue 2 #> 9 Cul2 [Phenology].HeadEmergencePpSensitivity.FixedValue 0 #> 10 Cul2 [Phenology].Phyllochron.BasePhyllochron.FixedValue 100 #> 11 Cul3 [Phenology].MinimumLeafNumber.FixedValue 1 #> 12 Cul3 [Phenology].VrnSensitivity.FixedValue 0 #> 13 Cul3 [Phenology].PpSensitivity.FixedValue 2 #> 14 Cul3 [Phenology].HeadEmergencePpSensitivity.FixedValue 0 #> 15 Cul3 [Phenology].Phyllochron.BasePhyllochron.FixedValue 100 #> 16 Cul4 [Phenology].MinimumLeafNumber.FixedValue 1 #> 17 Cul4 [Phenology].VrnSensitivity.FixedValue 0 #> 18 Cul4 [Phenology].PpSensitivity.FixedValue 2 #> 19 Cul4 [Phenology].HeadEmergencePpSensitivity.FixedValue 0 #> 20 Cul4 [Phenology].Phyllochron.BasePhyllochron.FixedValue 100 #> 21 Cul5 [Phenology].MinimumLeafNumber.FixedValue 1 #> 22 Cul5 [Phenology].VrnSensitivity.FixedValue 0 #> 23 Cul5 [Phenology].PpSensitivity.FixedValue 2 #> 24 Cul5 [Phenology].HeadEmergencePpSensitivity.FixedValue 0 #> 25 Cul5 [Phenology].Phyllochron.BasePhyllochron.FixedValue 100"},{"path":"https://rapsimng.bangyou.me/reference/get_metfile.html","id":null,"dir":"Reference","previous_headings":"","what":"Get the met file name for an experiment — get_metfile","title":"Get the met file name for an experiment — get_metfile","text":"Get met file name experiment","code":""},{"path":"https://rapsimng.bangyou.me/reference/get_metfile.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get the met file name for an experiment — get_metfile","text":"","code":"get_metfile(l, is_stop = TRUE)"},{"path":"https://rapsimng.bangyou.me/reference/get_metfile.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get the met file name for an experiment — get_metfile","text":"l list apsimxNode red read_apsimx is_stop Whether stop function error","code":""},{"path":"https://rapsimng.bangyou.me/reference/get_metfile.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get the met file name for an experiment — get_metfile","text":"met file name experiment","code":""},{"path":"https://rapsimng.bangyou.me/reference/get_metfile.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get the met file name for an experiment — get_metfile","text":"","code":"wheat <- read_apsimx(system.file(\"extdata/wheat.apsimx\", package = \"rapsimng\")) exp <- search_path(wheat, path = \"[Experiment]\") get_metfile(exp) #> [1] \"example.met\""},{"path":"https://rapsimng.bangyou.me/reference/get_parent.html","id":null,"dir":"Reference","previous_headings":"","what":"Get the parent node from a path — get_parent","title":"Get the parent node from a path — get_parent","text":"Get parent node path","code":""},{"path":"https://rapsimng.bangyou.me/reference/get_parent.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get the parent node from a path — get_parent","text":"","code":"get_parent(l, path)"},{"path":"https://rapsimng.bangyou.me/reference/get_parent.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get the parent node from a path — get_parent","text":"l list apsimx file path numeric, path returned search_path search_node. character, path supported apsimx","code":""},{"path":"https://rapsimng.bangyou.me/reference/get_parent.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get the parent node from a path — get_parent","text":"new list parent","code":""},{"path":"https://rapsimng.bangyou.me/reference/get_parent.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get the parent node from a path — get_parent","text":"","code":"wheat <- read_apsimx(system.file(\"extdata/Wheat.json\", package = \"rapsimng\")) a <- search_path(wheat, '[Structure].BranchingRate') get_parent(wheat, a$path) #> $node #> $node$`$type` #> [1] \"Models.PMF.Struct.Structure, Models\" #> #> $node$CohortInitialisationStage #> [1] \"Germination\" #> #> $node$LeafInitialisationStage #> [1] \"Emergence\" #> #> $node$Name #> [1] \"Structure\" #> #> $node$Children #> $node$Children[[1]] #> $node$Children[[1]]$`$type` #> [1] \"Models.Functions.MultiplyFunction, Models\" #> #> $node$Children[[1]]$Name #> [1] \"BranchingRate\" #> #> $node$Children[[1]]$Children #> $node$Children[[1]]$Children[[1]] #> $node$Children[[1]]$Children[[1]]$`$type` #> [1] \"Models.Functions.PhaseLookup, Models\" #> #> $node$Children[[1]]$Children[[1]]$Name #> [1] \"PotentialBranchingRate\" #> #> $node$Children[[1]]$Children[[1]]$Children #> $node$Children[[1]]$Children[[1]]$Children[[1]] #> $node$Children[[1]]$Children[[1]]$Children[[1]]$`$type` #> [1] \"Models.Functions.PhaseLookupValue, Models\" #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Start #> [1] \"Emergence\" #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$End #> [1] \"TerminalSpikelet\" #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Name #> [1] \"Vegetative\" #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]] #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$`$type` #> [1] \"Models.Functions.LinearInterpolationFunction, Models\" #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Name #> [1] \"PotentialBranchingRate\" #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]] #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$`$type` #> [1] \"Models.Functions.XYPairs, Models\" #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$X #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$X[[1]] #> [1] 1 #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$X[[2]] #> [1] 2 #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$X[[3]] #> [1] 3 #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$X[[4]] #> [1] 4 #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$X[[5]] #> [1] 5 #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$X[[6]] #> [1] 6 #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$X[[7]] #> [1] 7 #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$X[[8]] #> [1] 8 #> #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Y #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Y[[1]] #> [1] 0 #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Y[[2]] #> [1] 0 #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Y[[3]] #> [1] 1 #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Y[[4]] #> [1] 2 #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Y[[5]] #> [1] 5 #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Y[[6]] #> [1] 7 #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Y[[7]] #> [1] 15 #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Y[[8]] #> [1] 23 #> #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Name #> [1] \"XYPairs\" #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children #> list() #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$IncludeInDocumentation #> [1] TRUE #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Enabled #> [1] TRUE #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$ReadOnly #> [1] FALSE #> #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children[[2]] #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children[[2]]$`$type` #> [1] \"Models.Functions.VariableReference, Models\" #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children[[2]]$VariableName #> [1] \"[Structure].LeafTipsAppeared\" #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children[[2]]$Name #> [1] \"XValue\" #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children[[2]]$Children #> list() #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children[[2]]$IncludeInDocumentation #> [1] TRUE #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children[[2]]$Enabled #> [1] TRUE #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Children[[2]]$ReadOnly #> [1] FALSE #> #> #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$IncludeInDocumentation #> [1] TRUE #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$Enabled #> [1] TRUE #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Children[[1]]$ReadOnly #> [1] FALSE #> #> #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$IncludeInDocumentation #> [1] TRUE #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$Enabled #> [1] TRUE #> #> $node$Children[[1]]$Children[[1]]$Children[[1]]$ReadOnly #> [1] FALSE #> #> #> $node$Children[[1]]$Children[[1]]$Children[[2]] #> $node$Children[[1]]$Children[[1]]$Children[[2]]$`$type` #> [1] \"Models.Functions.PhaseLookupValue, Models\" #> #> $node$Children[[1]]$Children[[1]]$Children[[2]]$Start #> [1] \"TerminalSpikelet\" #> #> $node$Children[[1]]$Children[[1]]$Children[[2]]$End #> [1] \"HarvestRipe\" #> #> $node$Children[[1]]$Children[[1]]$Children[[2]]$Name #> [1] \"Reproductive\" #> #> $node$Children[[1]]$Children[[1]]$Children[[2]]$Children #> $node$Children[[1]]$Children[[1]]$Children[[2]]$Children[[1]] #> $node$Children[[1]]$Children[[1]]$Children[[2]]$Children[[1]]$`$type` #> [1] \"Models.Functions.Constant, Models\" #> #> $node$Children[[1]]$Children[[1]]$Children[[2]]$Children[[1]]$FixedValue #> [1] 0 #> #> $node$Children[[1]]$Children[[1]]$Children[[2]]$Children[[1]]$Units #> NULL #> #> $node$Children[[1]]$Children[[1]]$Children[[2]]$Children[[1]]$Name #> [1] \"Zero\" #> #> $node$Children[[1]]$Children[[1]]$Children[[2]]$Children[[1]]$Children #> list() #> #> $node$Children[[1]]$Children[[1]]$Children[[2]]$Children[[1]]$IncludeInDocumentation #> [1] TRUE #> #> $node$Children[[1]]$Children[[1]]$Children[[2]]$Children[[1]]$Enabled #> [1] TRUE #> #> $node$Children[[1]]$Children[[1]]$Children[[2]]$Children[[1]]$ReadOnly #> [1] FALSE #> #> #> #> $node$Children[[1]]$Children[[1]]$Children[[2]]$IncludeInDocumentation #> [1] TRUE #> #> $node$Children[[1]]$Children[[1]]$Children[[2]]$Enabled #> [1] TRUE #> #> $node$Children[[1]]$Children[[1]]$Children[[2]]$ReadOnly #> [1] FALSE #> #> #> #> $node$Children[[1]]$Children[[1]]$IncludeInDocumentation #> [1] TRUE #> #> $node$Children[[1]]$Children[[1]]$Enabled #> [1] TRUE #> #> $node$Children[[1]]$Children[[1]]$ReadOnly #> [1] FALSE #> #> #> $node$Children[[1]]$Children[[2]] #> $node$Children[[1]]$Children[[2]]$`$type` #> [1] \"Models.Functions.MinimumFunction, Models\" #> #> $node$Children[[1]]$Children[[2]]$Name #> [1] \"StressFactors\" #> #> $node$Children[[1]]$Children[[2]]$Children #> $node$Children[[1]]$Children[[2]]$Children[[1]] #> $node$Children[[1]]$Children[[2]]$Children[[1]]$`$type` #> [1] \"Models.Functions.LinearInterpolationFunction, Models\" #> #> $node$Children[[1]]$Children[[2]]$Children[[1]]$Name #> [1] \"CoverEffect\" #> #> $node$Children[[1]]$Children[[2]]$Children[[1]]$Children #> $node$Children[[1]]$Children[[2]]$Children[[1]]$Children[[1]] #> $node$Children[[1]]$Children[[2]]$Children[[1]]$Children[[1]]$`$type` #> [1] \"Models.Functions.XYPairs, Models\" #> #> $node$Children[[1]]$Children[[2]]$Children[[1]]$Children[[1]]$X #> $node$Children[[1]]$Children[[2]]$Children[[1]]$Children[[1]]$X[[1]] #> [1] 0 #> #> $node$Children[[1]]$Children[[2]]$Children[[1]]$Children[[1]]$X[[2]] #> [1] 0.1 #> #> $node$Children[[1]]$Children[[2]]$Children[[1]]$Children[[1]]$X[[3]] #> [1] 0.3 #> #> #> $node$Children[[1]]$Children[[2]]$Children[[1]]$Children[[1]]$Y #> $node$Children[[1]]$Children[[2]]$Children[[1]]$Children[[1]]$Y[[1]] #> [1] 1 #> #> $node$Children[[1]]$Children[[2]]$Children[[1]]$Children[[1]]$Y[[2]] #> [1] 1 #> #> $node$Children[[1]]$Children[[2]]$Children[[1]]$Children[[1]]$Y[[3]] #> [1] 0 #> #> #> $node$Children[[1]]$Children[[2]]$Children[[1]]$Children[[1]]$Name #> [1] \"XYPairs\" #> #> $node$Children[[1]]$Children[[2]]$Children[[1]]$Children[[1]]$Children #> list() #> #> $node$Children[[1]]$Children[[2]]$Children[[1]]$Children[[1]]$IncludeInDocumentation #> [1] TRUE #> #> $node$Children[[1]]$Children[[2]]$Children[[1]]$Children[[1]]$Enabled #> [1] TRUE #> #> $node$Children[[1]]$Children[[2]]$Children[[1]]$Children[[1]]$ReadOnly #> [1] FALSE #> #> #> $node$Children[[1]]$Children[[2]]$Children[[1]]$Children[[2]] #> $node$Children[[1]]$Children[[2]]$Children[[1]]$Children[[2]]$`$type` #> [1] \"Models.Functions.VariableReference, Models\" #> #> $node$Children[[1]]$Children[[2]]$Children[[1]]$Children[[2]]$VariableName #> [1] \"[Leaf].CoverTotal\" #> #> $node$Children[[1]]$Children[[2]]$Children[[1]]$Children[[2]]$Name #> [1] \"XValue\" #> #> $node$Children[[1]]$Children[[2]]$Children[[1]]$Children[[2]]$Children #> list() #> #> $node$Children[[1]]$Children[[2]]$Children[[1]]$Children[[2]]$IncludeInDocumentation #> [1] TRUE #> #> $node$Children[[1]]$Children[[2]]$Children[[1]]$Children[[2]]$Enabled #> [1] TRUE #> #> $node$Children[[1]]$Children[[2]]$Children[[1]]$Children[[2]]$ReadOnly #> [1] FALSE #> #> #> #> $node$Children[[1]]$Children[[2]]$Children[[1]]$IncludeInDocumentation #> [1] TRUE #> #> $node$Children[[1]]$Children[[2]]$Children[[1]]$Enabled #> [1] TRUE #> #> $node$Children[[1]]$Children[[2]]$Children[[1]]$ReadOnly #> [1] FALSE #> #> #> #> $node$Children[[1]]$Children[[2]]$IncludeInDocumentation #> [1] TRUE #> #> $node$Children[[1]]$Children[[2]]$Enabled #> [1] TRUE #> #> $node$Children[[1]]$Children[[2]]$ReadOnly #> [1] FALSE #> #> #> #> $node$Children[[1]]$IncludeInDocumentation #> [1] TRUE #> #> $node$Children[[1]]$Enabled #> [1] TRUE #> #> $node$Children[[1]]$ReadOnly #> [1] FALSE #> #> #> $node$Children[[2]] #> $node$Children[[2]]$`$type` #> [1] \"Models.PMF.Struct.HeightFunction, Models\" #> #> $node$Children[[2]]$Name #> [1] \"HeightModel\" #> #> $node$Children[[2]]$Children #> $node$Children[[2]]$Children[[1]] #> $node$Children[[2]]$Children[[1]]$`$type` #> [1] \"Models.Functions.LinearInterpolationFunction, Models\" #> #> $node$Children[[2]]$Children[[1]]$Name #> [1] \"PotentialHeight\" #> #> $node$Children[[2]]$Children[[1]]$Children #> $node$Children[[2]]$Children[[1]]$Children[[1]] #> $node$Children[[2]]$Children[[1]]$Children[[1]]$`$type` #> [1] \"Models.Functions.XYPairs, Models\" #> #> $node$Children[[2]]$Children[[1]]$Children[[1]]$X #> $node$Children[[2]]$Children[[1]]$Children[[1]]$X[[1]] #> [1] 3 #> #> $node$Children[[2]]$Children[[1]]$Children[[1]]$X[[2]] #> [1] 4 #> #> $node$Children[[2]]$Children[[1]]$Children[[1]]$X[[3]] #> [1] 5 #> #> $node$Children[[2]]$Children[[1]]$Children[[1]]$X[[4]] #> [1] 6 #> #> $node$Children[[2]]$Children[[1]]$Children[[1]]$X[[5]] #> [1] 7 #> #> $node$Children[[2]]$Children[[1]]$Children[[1]]$X[[6]] #> [1] 8 #> #> $node$Children[[2]]$Children[[1]]$Children[[1]]$X[[7]] #> [1] 9 #> #> #> $node$Children[[2]]$Children[[1]]$Children[[1]]$Y #> $node$Children[[2]]$Children[[1]]$Children[[1]]$Y[[1]] #> [1] 10 #> #> $node$Children[[2]]$Children[[1]]$Children[[1]]$Y[[2]] #> [1] 200 #> #> $node$Children[[2]]$Children[[1]]$Children[[1]]$Y[[3]] #> [1] 200 #> #> $node$Children[[2]]$Children[[1]]$Children[[1]]$Y[[4]] #> [1] 1000 #> #> $node$Children[[2]]$Children[[1]]$Children[[1]]$Y[[5]] #> [1] 1000 #> #> $node$Children[[2]]$Children[[1]]$Children[[1]]$Y[[6]] #> [1] 1000 #> #> $node$Children[[2]]$Children[[1]]$Children[[1]]$Y[[7]] #> [1] 1000 #> #> #> $node$Children[[2]]$Children[[1]]$Children[[1]]$Name #> [1] \"XYPairs\" #> #> $node$Children[[2]]$Children[[1]]$Children[[1]]$Children #> list() #> #> $node$Children[[2]]$Children[[1]]$Children[[1]]$IncludeInDocumentation #> [1] TRUE #> #> $node$Children[[2]]$Children[[1]]$Children[[1]]$Enabled #> [1] TRUE #> #> $node$Children[[2]]$Children[[1]]$Children[[1]]$ReadOnly #> [1] FALSE #> #> #> $node$Children[[2]]$Children[[1]]$Children[[2]] #> $node$Children[[2]]$Children[[1]]$Children[[2]]$`$type` #> [1] \"Models.Functions.VariableReference, Models\" #> #> $node$Children[[2]]$Children[[1]]$Children[[2]]$VariableName #> [1] \"[Phenology].Stage\" #> #> $node$Children[[2]]$Children[[1]]$Children[[2]]$Name #> [1] \"XValue\" #> #> $node$Children[[2]]$Children[[1]]$Children[[2]]$Children #> list() #> #> $node$Children[[2]]$Children[[1]]$Children[[2]]$IncludeInDocumentation #> [1] TRUE #> #> $node$Children[[2]]$Children[[1]]$Children[[2]]$Enabled #> [1] TRUE #> #> $node$Children[[2]]$Children[[1]]$Children[[2]]$ReadOnly #> [1] FALSE #> #> #> #> $node$Children[[2]]$Children[[1]]$IncludeInDocumentation #> [1] TRUE #> #> $node$Children[[2]]$Children[[1]]$Enabled #> [1] TRUE #> #> $node$Children[[2]]$Children[[1]]$ReadOnly #> [1] FALSE #> #> #> $node$Children[[2]]$Children[[2]] #> $node$Children[[2]]$Children[[2]]$`$type` #> [1] \"Models.Functions.LinearInterpolationFunction, Models\" #> #> $node$Children[[2]]$Children[[2]]$Name #> [1] \"WaterStress\" #> #> $node$Children[[2]]$Children[[2]]$Children #> $node$Children[[2]]$Children[[2]]$Children[[1]] #> $node$Children[[2]]$Children[[2]]$Children[[1]]$`$type` #> [1] \"Models.Functions.XYPairs, Models\" #> #> $node$Children[[2]]$Children[[2]]$Children[[1]]$X #> $node$Children[[2]]$Children[[2]]$Children[[1]]$X[[1]] #> [1] 0.3 #> #> $node$Children[[2]]$Children[[2]]$Children[[1]]$X[[2]] #> [1] 1 #> #> #> $node$Children[[2]]$Children[[2]]$Children[[1]]$Y #> $node$Children[[2]]$Children[[2]]$Children[[1]]$Y[[1]] #> [1] 0 #> #> $node$Children[[2]]$Children[[2]]$Children[[1]]$Y[[2]] #> [1] 1 #> #> #> $node$Children[[2]]$Children[[2]]$Children[[1]]$Name #> [1] \"XYPairs\" #> #> $node$Children[[2]]$Children[[2]]$Children[[1]]$Children #> list() #> #> $node$Children[[2]]$Children[[2]]$Children[[1]]$IncludeInDocumentation #> [1] TRUE #> #> $node$Children[[2]]$Children[[2]]$Children[[1]]$Enabled #> [1] TRUE #> #> $node$Children[[2]]$Children[[2]]$Children[[1]]$ReadOnly #> [1] FALSE #> #> #> $node$Children[[2]]$Children[[2]]$Children[[2]] #> $node$Children[[2]]$Children[[2]]$Children[[2]]$`$type` #> [1] \"Models.Functions.VariableReference, Models\" #> #> $node$Children[[2]]$Children[[2]]$Children[[2]]$VariableName #> [1] \"[Leaf].Fw\" #> #> $node$Children[[2]]$Children[[2]]$Children[[2]]$Name #> [1] \"XValue\" #> #> $node$Children[[2]]$Children[[2]]$Children[[2]]$Children #> list() #> #> $node$Children[[2]]$Children[[2]]$Children[[2]]$IncludeInDocumentation #> [1] TRUE #> #> $node$Children[[2]]$Children[[2]]$Children[[2]]$Enabled #> [1] TRUE #> #> $node$Children[[2]]$Children[[2]]$Children[[2]]$ReadOnly #> [1] FALSE #> #> #> #> $node$Children[[2]]$Children[[2]]$IncludeInDocumentation #> [1] TRUE #> #> $node$Children[[2]]$Children[[2]]$Enabled #> [1] TRUE #> #> $node$Children[[2]]$Children[[2]]$ReadOnly #> [1] FALSE #> #> #> #> $node$Children[[2]]$IncludeInDocumentation #> [1] TRUE #> #> $node$Children[[2]]$Enabled #> [1] TRUE #> #> $node$Children[[2]]$ReadOnly #> [1] FALSE #> #> #> #> $node$IncludeInDocumentation #> [1] TRUE #> #> $node$Enabled #> [1] TRUE #> #> $node$ReadOnly #> [1] FALSE #> #> #> $path #> [1] 1 1 4 #>"},{"path":"https://rapsimng.bangyou.me/reference/get_simulations.html","id":null,"dir":"Reference","previous_headings":"","what":"Get simulations for a factorial experiment — get_simulations","title":"Get simulations for a factorial experiment — get_simulations","text":"Get simulations factorial experiment","code":""},{"path":"https://rapsimng.bangyou.me/reference/get_simulations.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get simulations for a factorial experiment — get_simulations","text":"","code":"get_simulations(l)"},{"path":"https://rapsimng.bangyou.me/reference/get_simulations.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get simulations for a factorial experiment — get_simulations","text":"l list read_apsim Factorial.Permutation root.","code":""},{"path":"https://rapsimng.bangyou.me/reference/get_simulations.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get simulations for a factorial experiment — get_simulations","text":"list Factor name Levels values","code":""},{"path":"https://rapsimng.bangyou.me/reference/get_simulations.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Get simulations for a factorial experiment — get_simulations","text":"","code":"wheat <- read_apsimx(system.file(\"extdata/wheat.apsimx\", package = \"rapsimng\")) permutation <- search_path(wheat, path = \"[Factors].Permutation\") get_simulations(permutation$node) #> $V #> [1] \"1\" \"2\" #> #> $Cv #> [1] \"Axe\" \"Bolac\" \"Calingiri\" #> #> $N #> [1] \"0\" \"200\" #>"},{"path":"https://rapsimng.bangyou.me/reference/insert_model.html","id":null,"dir":"Reference","previous_headings":"","what":"Insert a model into apsimx — insert_model","title":"Insert a model into apsimx — insert_model","text":"Insert model apsimx","code":""},{"path":"https://rapsimng.bangyou.me/reference/insert_model.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Insert a model into apsimx — insert_model","text":"","code":"insert_model(l, path, model)"},{"path":"https://rapsimng.bangyou.me/reference/insert_model.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Insert a model into apsimx — insert_model","text":"l list apsimx file path numeric, path returned search_path search_node. character, path supported apsimx model new model","code":""},{"path":"https://rapsimng.bangyou.me/reference/insert_model.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Insert a model into apsimx — insert_model","text":"modified list new value","code":""},{"path":"https://rapsimng.bangyou.me/reference/insert_model.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Insert a model into apsimx — insert_model","text":"","code":"wheat <- read_apsimx(system.file(\"extdata/wheat.apsimx\", package = \"rapsimng\")) replacements <- new_model(\"Core.Replacements\") wheat_new <- insert_model(wheat, 1, replacements) replacements_node <- search_path(wheat_new, \".Simulations.Replacements\") replacements_node$path #> [1] 1 3 # Add a cultivar folder under replacements cultivar_folder <- new_model(\"PMF.CultivarFolder\", \"Cultivars\") wheat_new <- insert_model(wheat_new, replacements_node$path, cultivar_folder) cultivar_folder_node <- search_path(wheat_new, \".Simulations.Replacements.Cultivars\") cultivar_folder_node$path #> [1] 1 3 1 # Add an new cultivar cultivar <- new_model(\"PMF.Cultivar\", \"Hartog\") wheat_new <- insert_model(wheat_new, cultivar_folder_node$path, cultivar) cultivar_node <- search_path(wheat_new, \".Simulations.Replacements.Cultivars.Hartog\") cultivar_node$path #> [1] 1 3 1 1"},{"path":"https://rapsimng.bangyou.me/reference/insert_models.html","id":null,"dir":"Reference","previous_headings":"","what":"Insert models into apsimx — insert_models","title":"Insert models into apsimx — insert_models","text":"Insert models apsimx","code":""},{"path":"https://rapsimng.bangyou.me/reference/insert_models.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Insert models into apsimx — insert_models","text":"","code":"insert_models(l, path, models)"},{"path":"https://rapsimng.bangyou.me/reference/insert_models.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Insert models into apsimx — insert_models","text":"l list apsimx file path numeric, path returned search_path search_node. character, path supported apsimx models New models","code":""},{"path":"https://rapsimng.bangyou.me/reference/insert_models.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Insert models into apsimx — insert_models","text":"modified list new value","code":""},{"path":"https://rapsimng.bangyou.me/reference/insert_models.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Insert models into apsimx — insert_models","text":"","code":"wheat <- read_apsimx(system.file(\"extdata/wheat.apsimx\", package = \"rapsimng\")) replacements <- new_model(\"Core.Replacements\") wheat_new <- insert_model(wheat, 1, replacements) replacements_node <- search_path(wheat_new, \".Simulations.Replacements\") replacements_node$path #> [1] 1 3 # Add a cultivar folder under replacements cultivar_folder <- new_model(\"PMF.CultivarFolder\", \"Cultivars\") wheat_new <- insert_model(wheat_new, replacements_node$path, cultivar_folder) cultivar_folder_node <- search_path(wheat_new, \".Simulations.Replacements.Cultivars\") cultivar_folder_node$path #> [1] 1 3 1 # Add an new cultivar cultivar <- new_model(\"PMF.Cultivar\", \"Hartog\") wheat_new <- insert_model(wheat_new, cultivar_folder_node$path, cultivar) cultivar_node <- search_path(wheat_new, \".Simulations.Replacements.Cultivars.Hartog\") cultivar_node$path #> [1] 1 3 1 1"},{"path":"https://rapsimng.bangyou.me/reference/keep_simulations.html","id":null,"dir":"Reference","previous_headings":"","what":"Keep simulations for a factorial experiment — keep_simulations","title":"Keep simulations for a factorial experiment — keep_simulations","text":"Keep simulations factorial experiment","code":""},{"path":"https://rapsimng.bangyou.me/reference/keep_simulations.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Keep simulations for a factorial experiment — keep_simulations","text":"","code":"keep_simulations(l, s)"},{"path":"https://rapsimng.bangyou.me/reference/keep_simulations.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Keep simulations for a factorial experiment — keep_simulations","text":"l list read_apsim Factorial.Permutation root. s list factor name levels value keep. factor kept specified.","code":""},{"path":"https://rapsimng.bangyou.me/reference/keep_simulations.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Keep simulations for a factorial experiment — keep_simulations","text":"new list removed simulations.","code":""},{"path":"https://rapsimng.bangyou.me/reference/keep_simulations.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Keep simulations for a factorial experiment — keep_simulations","text":"","code":"wheat <- read_apsimx(system.file(\"extdata/wheat.apsimx\", package = \"rapsimng\")) permutation <- search_path(wheat, path = \"[Factors].Permutation\") permutation_new <- keep_simulations(permutation$node, list(V = \"2\")) get_simulations(permutation_new) #> $V #> [1] \"2\" #> #> $Cv #> [1] \"Axe\" \"Bolac\" \"Calingiri\" #> #> $N #> [1] \"0\" \"200\" #> permutation_new <- keep_simulations(permutation$node, list(Cv = c(\"Axe\", \"Bolac\"))) get_simulations(permutation_new) #> $V #> [1] \"1\" \"2\" #> #> $Cv #> [1] \"Axe\" \"Bolac\" #> #> $N #> [1] \"0\" \"200\" #> permutation_new <- keep_simulations(permutation$node, list(V = \"1\", Cv = c(\"Axe\", \"Bolac\"))) get_simulations(permutation_new) #> $V #> [1] \"1\" #> #> $Cv #> [1] \"Axe\" \"Bolac\" #> #> $N #> [1] \"0\" \"200\" #>"},{"path":"https://rapsimng.bangyou.me/reference/list_report.html","id":null,"dir":"Reference","previous_headings":"","what":"List all reports in the database — list_report","title":"List all reports in the database — list_report","text":"List reports database","code":""},{"path":"https://rapsimng.bangyou.me/reference/list_report.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"List all reports in the database — list_report","text":"","code":"list_report(file)"},{"path":"https://rapsimng.bangyou.me/reference/list_report.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"List all reports in the database — list_report","text":"file file path apsimx db file","code":""},{"path":"https://rapsimng.bangyou.me/reference/list_report.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"List all reports in the database — list_report","text":"vector reports","code":""},{"path":"https://rapsimng.bangyou.me/reference/list_report.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"List all reports in the database — list_report","text":"","code":"file <- system.file(\"extdata/wheat.apsimx\", package = \"rapsimng\") list_report(file) #> [1] \"HarvestReport\""},{"path":"https://rapsimng.bangyou.me/reference/minimum_apsimng.html","id":null,"dir":"Reference","previous_headings":"","what":"Create the minimum requirements to run an APSIM Next Generation — minimum_apsimng","title":"Create the minimum requirements to run an APSIM Next Generation — minimum_apsimng","text":"Create minimum requirements run APSIM Next Generation","code":""},{"path":"https://rapsimng.bangyou.me/reference/minimum_apsimng.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create the minimum requirements to run an APSIM Next Generation — minimum_apsimng","text":"","code":"minimum_apsimng(install_path, output)"},{"path":"https://rapsimng.bangyou.me/reference/minimum_apsimng.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create the minimum requirements to run an APSIM Next Generation — minimum_apsimng","text":"install_path installed path APSIM Next Generation output output folder","code":""},{"path":"https://rapsimng.bangyou.me/reference/minimum_apsimng.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create the minimum requirements to run an APSIM Next Generation — minimum_apsimng","text":"","code":"if (FALSE) { minimum_apsimng(\"C:/ProgramFiles/APSIMNG\", \"minimum_apsimng\") }"},{"path":"https://rapsimng.bangyou.me/reference/new_model.html","id":null,"dir":"Reference","previous_headings":"","what":"Create a new model — new_model","title":"Create a new model — new_model","text":"Create new model","code":""},{"path":"https://rapsimng.bangyou.me/reference/new_model.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create a new model — new_model","text":"","code":"new_model(model, name = model)"},{"path":"https://rapsimng.bangyou.me/reference/new_model.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create a new model — new_model","text":"model name new model name new name","code":""},{"path":"https://rapsimng.bangyou.me/reference/new_model.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Create a new model — new_model","text":"","code":"new_model(model = \"PMF.Cultivar\") #> $`$type` #> [1] \"Models.PMF.Cultivar, Models\" #> #> $Name #> [1] \"Cultivar\" #> #> $Children #> list() #> #> $IncludeInDocumentation #> [1] TRUE #> #> $Enabled #> [1] TRUE #> #> $ReadOnly #> [1] FALSE #> #> $Alias #> list() #> #> $Command #> list() #> new_model(model = \"PMF.Cultivar\", name = \"example\") #> $`$type` #> [1] \"Models.PMF.Cultivar, Models\" #> #> $Name #> [1] \"example\" #> #> $Children #> list() #> #> $IncludeInDocumentation #> [1] TRUE #> #> $Enabled #> [1] TRUE #> #> $ReadOnly #> [1] FALSE #> #> $Alias #> list() #> #> $Command #> list() #>"},{"path":"https://rapsimng.bangyou.me/reference/read_apsimx.html","id":null,"dir":"Reference","previous_headings":"","what":"Read APSIMX file — read_apsimx","title":"Read APSIMX file — read_apsimx","text":"Read APSIMX file","code":""},{"path":"https://rapsimng.bangyou.me/reference/read_apsimx.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read APSIMX file — read_apsimx","text":"","code":"read_apsimx(path)"},{"path":"https://rapsimng.bangyou.me/reference/read_apsimx.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read APSIMX file — read_apsimx","text":"path file path URL apsimx file","code":""},{"path":"https://rapsimng.bangyou.me/reference/read_apsimx.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read APSIMX file — read_apsimx","text":"list object apsimx file","code":""},{"path":"https://rapsimng.bangyou.me/reference/read_apsimx.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Read APSIMX file — read_apsimx","text":"","code":"file <- system.file(\"extdata/wheat.apsimx\", package = \"rapsimng\") m <- read_apsimx(file)"},{"path":"https://rapsimng.bangyou.me/reference/read_report.html","id":null,"dir":"Reference","previous_headings":"","what":"Read apsimx database in db file format — read_report","title":"Read apsimx database in db file format — read_report","text":"Read apsimx database db file format","code":""},{"path":"https://rapsimng.bangyou.me/reference/read_report.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Read apsimx database in db file format — read_report","text":"","code":"read_report(file, report)"},{"path":"https://rapsimng.bangyou.me/reference/read_report.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Read apsimx database in db file format — read_report","text":"file file path apsimx db file report report name","code":""},{"path":"https://rapsimng.bangyou.me/reference/read_report.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Read apsimx database in db file format — read_report","text":"data.frame report","code":""},{"path":"https://rapsimng.bangyou.me/reference/read_report.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Read apsimx database in db file format — read_report","text":"","code":"file <- system.file(\"extdata/wheat.apsimx\", package = \"rapsimng\") read_report(file, \"HarvestReport\") #> # A tibble: 12 × 15 #> CheckpointID SimulationID Experiment FolderName V Cv N Zone #> #> 1 1 1 Experiment Folder 1 Axe 0 Field #> 2 1 4 Experiment Folder 2 Axe 0 Field #> 3 1 2 Experiment Folder 1 Calingiri 0 Field #> 4 1 6 Experiment Folder 1 Axe 200 Field #> 5 1 3 Experiment Folder 1 Bolac 0 Field #> 6 1 5 Experiment Folder 2 Calingiri 0 Field #> 7 1 7 Experiment Folder 2 Bolac 0 Field #> 8 1 9 Experiment Folder 1 Bolac 200 Field #> 9 1 8 Experiment Folder 2 Bolac 200 Field #> 10 1 10 Experiment Folder 2 Axe 200 Field #> 11 1 12 Experiment Folder 1 Calingiri 200 Field #> 12 1 11 Experiment Folder 2 Calingiri 200 Field #> # ℹ 7 more variables: Clock.Today , Wheat.Phenology.Stage , #> # Wheat.Phenology.Zadok.Stage , Wheat.Phenology.FloweringDAS , #> # Wheat.Phenology.FlagLeafDAS , #> # Wheat.Phenology.TerminalSpikeletDAS , Name "},{"path":"https://rapsimng.bangyou.me/reference/remove_model.html","id":null,"dir":"Reference","previous_headings":"","what":"Remove a model with new values — remove_model","title":"Remove a model with new values — remove_model","text":"Remove model new values","code":""},{"path":"https://rapsimng.bangyou.me/reference/remove_model.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Remove a model with new values — remove_model","text":"","code":"remove_model(l, path)"},{"path":"https://rapsimng.bangyou.me/reference/remove_model.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Remove a model with new values — remove_model","text":"l list apsimx file path numeric, path returned search_path search_node. character, path supported apsimx","code":""},{"path":"https://rapsimng.bangyou.me/reference/remove_model.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Remove a model with new values — remove_model","text":"modified list new value","code":""},{"path":"https://rapsimng.bangyou.me/reference/remove_model.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Remove a model with new values — remove_model","text":"","code":"wheat <- read_apsimx(system.file(\"extdata/Wheat.json\", package = \"rapsimng\")) a <- search_path(wheat, '[Wheat].Phenology.ThermalTime') wheat_new <- remove_model(wheat, a$path) b <- search_path(wheat_new, '[Wheat].Phenology.ThermalTime') b #> list()"},{"path":"https://rapsimng.bangyou.me/reference/replace_model.html","id":null,"dir":"Reference","previous_headings":"","what":"Replace a model with new values — replace_model","title":"Replace a model with new values — replace_model","text":"Replace model new values","code":""},{"path":"https://rapsimng.bangyou.me/reference/replace_model.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Replace a model with new values — replace_model","text":"","code":"replace_model(l, path, model)"},{"path":"https://rapsimng.bangyou.me/reference/replace_model.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Replace a model with new values — replace_model","text":"l list apsimx file path numeric, path returned search_path search_node. character, path supported apsimx model new model","code":""},{"path":"https://rapsimng.bangyou.me/reference/replace_model.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Replace a model with new values — replace_model","text":"modified list new value","code":""},{"path":"https://rapsimng.bangyou.me/reference/replace_model.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Replace a model with new values — replace_model","text":"","code":"wheat <- read_apsimx(system.file(\"extdata/Wheat.json\", package = \"rapsimng\")) a <- search_path(wheat, '[Wheat].Phenology.ThermalTime') a$node$Children[[1]]$X[[2]] <- 27 wheat_new <- replace_model(wheat, a$path, a$node) b <- search_path(wheat_new, '[Wheat].Phenology.ThermalTime') b$node$Children[[1]]$X #> [[1]] #> [1] 0 #> #> [[2]] #> [1] 27 #> #> [[3]] #> [1] 37 #>"},{"path":"https://rapsimng.bangyou.me/reference/run_models.html","id":null,"dir":"Reference","previous_headings":"","what":"Run apsimx file using Models.exe — run_models","title":"Run apsimx file using Models.exe — run_models","text":"Run apsimx file using Models.exe","code":""},{"path":"https://rapsimng.bangyou.me/reference/run_models.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Run apsimx file using Models.exe — run_models","text":"","code":"run_models( models_exe, path, pattern = NULL, recurse = FALSE, csv = FALSE, parallel = NULL, ncpus = NULL, verbose = FALSE )"},{"path":"https://rapsimng.bangyou.me/reference/run_models.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Run apsimx file using Models.exe — run_models","text":"models_exe path Models.exe path path .apsimx file. May include wildcard. pattern Use filter simulation names run. recurse Recursively search subdirectories files matching ApsimXFileSpec. FALSE default. csv Export reports .csv files. FALSE default. parallel Use multi-process job runner. FALSE, use single threaded; TRUE, use multi-process job runner ncpus Set number processors use. processes default verbose Write messages StdOut simulation starts/finishes. effect running directory .apsimx files (*.apsimx).","code":""},{"path":"https://rapsimng.bangyou.me/reference/search_node.html","id":null,"dir":"Reference","previous_headings":"","what":"Find element(s) in apsimx file — search_node","title":"Find element(s) in apsimx file — search_node","text":"Find element(s) apsimx file","code":""},{"path":"https://rapsimng.bangyou.me/reference/search_node.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find element(s) in apsimx file — search_node","text":"","code":"search_node(l, all = FALSE, max_depth = 1e+06, case_insensitive = TRUE, ...)"},{"path":"https://rapsimng.bangyou.me/reference/search_node.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find element(s) in apsimx file — search_node","text":"l list apsimx file Whether find elements max_depth maximum depth search case_insensitive Whether case sensitive ... names arguments property match","code":""},{"path":"https://rapsimng.bangyou.me/reference/search_node.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find element(s) in apsimx file — search_node","text":"list matching criteria equals TRUE, list node path equals FALSE (default)","code":""},{"path":"https://rapsimng.bangyou.me/reference/search_node.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find element(s) in apsimx file — search_node","text":"","code":"wheat <- read_apsimx(system.file(\"extdata/Wheat.json\", package = \"rapsimng\")) # Return empty list if not found search_node(wheat, Name = \"Simulations1\") #> list() # Find root level a <- search_node(wheat, Name = \"Simulations\") a$path #> [1] 1 # Find sub-level a <- search_node(wheat, Name = \"Wheat\") a$path #> [1] 1 1 a <- search_node(wheat, `$type` = \"Models.PMF.Cultivar, Models\") a$path #> [1] 1 1 5 1 # Find multiple attributes a <- search_node(wheat, Name = 'PotentialBranchingRate', `$type` = \"Models.Functions.PhaseLookup, Models\") a$path #> [1] 1 1 4 1 1 a$node$Name #> [1] \"PotentialBranchingRate\" # Find all cultivar nodes a <- search_node(wheat, `$type` = \"Models.PMF.Cultivar, Models\", all = TRUE) length(a) #> [1] 5"},{"path":"https://rapsimng.bangyou.me/reference/search_path.html","id":null,"dir":"Reference","previous_headings":"","what":"Find a model in the apsimx file using specified path — search_path","title":"Find a model in the apsimx file using specified path — search_path","text":"Find model apsimx file using specified path","code":""},{"path":"https://rapsimng.bangyou.me/reference/search_path.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find a model in the apsimx file using specified path — search_path","text":"","code":"search_path(l, path, case_insensitive = TRUE)"},{"path":"https://rapsimng.bangyou.me/reference/search_path.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find a model in the apsimx file using specified path — search_path","text":"l list apsimx file path specified path (See details) case_insensitive Whether case sensitive","code":""},{"path":"https://rapsimng.bangyou.me/reference/search_path.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find a model in the apsimx file using specified path — search_path","text":"list specified path.","code":""},{"path":"https://rapsimng.bangyou.me/reference/search_path.html","id":"absolute-paths","dir":"Reference","previous_headings":"","what":"Absolute Paths","title":"Find a model in the apsimx file using specified path — search_path","text":"Absolute paths leading ‘.’ e.g. .Simulations.Test.Clock - absolute path - refers clock model 'Test' simulation.","code":""},{"path":"https://rapsimng.bangyou.me/reference/search_path.html","id":"scoped-paths","dir":"Reference","previous_headings":"","what":"Scoped Paths","title":"Find a model in the apsimx file using specified path — search_path","text":"Scoped paths leading model type square brackets. model specified name, scope, located applying rest path. [Soil].Water - scoped path - refers Water model child model name 'Soil' scope","code":""},{"path":"https://rapsimng.bangyou.me/reference/search_path.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Find a model in the apsimx file using specified path — search_path","text":"","code":"wheat <- read_apsimx(system.file(\"extdata/Wheat.json\", package = \"rapsimng\")) # Return empty list if not found search_path(wheat, \"[Simulations1]\") #> list() # Search root path a <- search_path(wheat, '.Simulations') a$path #> [1] 1 a$node$Name #> [1] \"Simulations\" # Level one a <- search_path(wheat, '.Simulations.Wheat1') a$path #> NULL a$node$Name #> NULL # Level two a <- search_path(wheat, '.Simulations.Wheat') a$path #> [1] 1 1 a$node$Name #> [1] \"Wheat\" # Level three a <- search_path(wheat, '.Simulations.Wheat.BranchingRate') a$path #> NULL a$node$Name #> NULL a <- search_path(wheat, '.Simulations.Wheat.Structure') a$path #> [1] 1 1 4 a$node$Name #> [1] \"Structure\" # Level four a <- search_path(wheat, '.Simulations.Wheat.Structure.BranchingRate') a$path #> [1] 1 1 4 1 a$node$Name #> [1] \"BranchingRate\" a <- search_path(wheat, '.Simulations.Wheat.Structure.BranchingRate1') a$path #> NULL a$node$Name #> NULL # scoped # Root path a <- search_path(wheat, '[Simulations1]') a <- search_path(wheat, '[Simulations]') a$path #> [1] 1 a$node$Name #> [1] \"Simulations\" # Level two a <- search_path(wheat, '[Simulations].Wheat1') a <- search_path(wheat, '[Simulations1].Wheat') a$path #> NULL a$node$Name #> NULL a <- search_path(wheat, '[Whea]') a <- search_path(wheat, '[Wheat]') a$path #> [1] 1 1 a$node$Name #> [1] \"Wheat\" # Level three a <- search_path(wheat, '[Wheat].BranchingRate') a <- search_path(wheat, '[Wheat].Structure') a$path #> [1] 1 1 4 a$node$Name #> [1] \"Structure\" a <- search_path(wheat, '[Structure]') a$path #> [1] 1 1 4 a$node$Name #> [1] \"Structure\" # Level four a <- search_path(wheat, '[Structure].BranchingRate') a$path #> [1] 1 1 4 1 a$node$Name #> [1] \"BranchingRate\" a <- search_path(wheat, '[Structure].BranchingRate1') a <- search_path(wheat, '[Structure1].BranchingRate')"},{"path":"https://rapsimng.bangyou.me/reference/set_parameter_value.html","id":null,"dir":"Reference","previous_headings":"","what":"Set a parameter with a new value — set_parameter_value","title":"Set a parameter with a new value — set_parameter_value","text":"Set parameter new value","code":""},{"path":"https://rapsimng.bangyou.me/reference/set_parameter_value.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set a parameter with a new value — set_parameter_value","text":"","code":"set_parameter_value(l, parameter, value)"},{"path":"https://rapsimng.bangyou.me/reference/set_parameter_value.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set a parameter with a new value — set_parameter_value","text":"l list apsimx file parameter name parameter APSIM NG specification value new value","code":""},{"path":"https://rapsimng.bangyou.me/reference/set_parameter_value.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set a parameter with a new value — set_parameter_value","text":"list replaced value","code":""},{"path":"https://rapsimng.bangyou.me/reference/set_parameter_value.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Set a parameter with a new value — set_parameter_value","text":"","code":"wheat <- read_apsimx(system.file(\"extdata/Wheat.json\", package = \"rapsimng\")) new_wheat <- set_parameter_value(wheat, \"[Structure].BranchingRate.PotentialBranchingRate.Reproductive.Zero.FixedValue\", 1) new_wheat2 <- search_path(new_wheat, \"[Structure].BranchingRate.PotentialBranchingRate.Reproductive.Zero\") new_wheat2$node$FixedValue #> [1] 1 new_wheat <- set_parameter_value( wheat, \"[Structure].HeightModel.WaterStress.XYPairs.Y\", \"0.1,1.1\") new_wheat2 <- search_path(new_wheat, \"[Structure].HeightModel.WaterStress.XYPairs\") new_wheat2$node$Y #> [[1]] #> [1] \"0.1\" #> #> [[2]] #> [1] \"1.1\" #>"},{"path":"https://rapsimng.bangyou.me/reference/test_apsimx.html","id":null,"dir":"Reference","previous_headings":"","what":"Test whether all files under published folder of apsimx are required — test_apsimx","title":"Test whether all files under published folder of apsimx are required — test_apsimx","text":"Test whether files published folder apsimx required","code":""},{"path":"https://rapsimng.bangyou.me/reference/test_apsimx.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Test whether all files under published folder of apsimx are required — test_apsimx","text":"","code":"test_apsimx(base, example)"},{"path":"https://rapsimng.bangyou.me/reference/test_apsimx.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Test whether all files under published folder of apsimx are required — test_apsimx","text":"base base folder path apsimx publish example example apsimx file","code":""},{"path":"https://rapsimng.bangyou.me/reference/test_apsimx.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Test whether all files under published folder of apsimx are required — test_apsimx","text":"vector required files","code":""},{"path":"https://rapsimng.bangyou.me/reference/update_cultivar.html","id":null,"dir":"Reference","previous_headings":"","what":"Title Update the cultivar parameters — update_cultivar","title":"Title Update the cultivar parameters — update_cultivar","text":"function assumes file apsimx format. new Replacements node added exist. existing cultivar parameters updated. New cultivar created.","code":""},{"path":"https://rapsimng.bangyou.me/reference/update_cultivar.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Title Update the cultivar parameters — update_cultivar","text":"","code":"update_cultivar( l, df, add = TRUE, use_folder = TRUE, cultivar_folder = \"Cultivars\" )"},{"path":"https://rapsimng.bangyou.me/reference/update_cultivar.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Title Update the cultivar parameters — update_cultivar","text":"l list apsimx file df data frame new parameters three columns, .e. name, parameter value. add Whether add extra nodes (e.g. replacements, Cultivars folder new cultivar) use_folder use cultivar folder add new cultivars cultivar_folder folder name cultivars","code":""},{"path":"https://rapsimng.bangyou.me/reference/update_cultivar.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Title Update the cultivar parameters — update_cultivar","text":"modified apsimx file","code":""},{"path":"https://rapsimng.bangyou.me/reference/update_cultivar.html","id":"ref-examples","dir":"Reference","previous_headings":"","what":"Examples","title":"Title Update the cultivar parameters — update_cultivar","text":"","code":"wheat <- read_apsimx(system.file(\"extdata/wheat.apsimx\", package = \"rapsimng\")) # Update cultivars df <- data.frame(name = rep(\"Hartog\", 3), parameter = c(\"[Phenology].MinimumLeafNumber.FixedValue\", \"[Phenology].VrnSensitivity.FixedValue\", \"[Phenology].PpSensitivity.FixedValue\"), value = c(9, 7, 3)) wheat_cultivar <- update_cultivar(wheat, df) hartog <- search_path(wheat_cultivar, \"[Replacements].Hartog\") hartog$path #> NULL"},{"path":"https://rapsimng.bangyou.me/reference/write_apsimx.html","id":null,"dir":"Reference","previous_headings":"","what":"Write APSIMX file — write_apsimx","title":"Write APSIMX file — write_apsimx","text":"Write APSIMX file","code":""},{"path":"https://rapsimng.bangyou.me/reference/write_apsimx.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Write APSIMX file — write_apsimx","text":"","code":"write_apsimx(l, file)"},{"path":"https://rapsimng.bangyou.me/reference/write_apsimx.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Write APSIMX file — write_apsimx","text":"l list apsimx file file file path apsimx file","code":""},{"path":"https://rapsimng.bangyou.me/reference/write_apsimx.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Write APSIMX file — write_apsimx","text":"list object apsimx file","code":""},{"path":"https://rapsimng.bangyou.me/news/index.html","id":"rapsimng-010","dir":"Changelog","previous_headings":"","what":"RApsimNG 0.1.0","title":"RApsimNG 0.1.0","text":"CRAN release: 2020-10-13 first release RApsimNG.","code":""},{"path":"https://rapsimng.bangyou.me/news/index.html","id":"rapsimng-020","dir":"Changelog","previous_headings":"","what":"RApsimNG 0.2.0","title":"RApsimNG 0.2.0","text":"CRAN release: 2021-03-30 New functions walk json tree New functions manipulate simulations (list, keep drop simulations) New functions set parameter value path Several bug fixes","code":""},{"path":"https://rapsimng.bangyou.me/news/index.html","id":"rapsimng-030","dir":"Changelog","previous_headings":"","what":"RApsimNG 0.3.0","title":"RApsimNG 0.3.0","text":"CRAN release: 2021-09-09 Several bug fixes","code":""},{"path":"https://rapsimng.bangyou.me/news/index.html","id":"rapsimng-042","dir":"Changelog","previous_headings":"","what":"RApsimNG 0.4.2","title":"RApsimNG 0.4.2","text":"CRAN release: 2024-01-22 Several bug fixes Update new version APSIM NG Update update_cultivar add new cultivar parameters","code":""}]