PecanProject / pecan

The Predictive Ecosystem Analyzer (PEcAn) is an integrated ecological bioinformatics toolbox.

Home Page:www.pecanproject.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`write.config.xml.ED2()` doesn't use correct ED2 default dataset.

Aariq opened this issue · comments

Bug Description

Because the datasets history, history.r46, etc. are non-exported, data() doesn't work on them. Current code to find the correct dataset based on the <revision> tag is therefore broken

data(list=histfile, package = 'PEcAn.ED2', envir = environment())

Proposed solution

Internal data should be referenced with packagename:::dataset, so I'll replace the non-functioning code with a switch() statement like:

edhistory <- switch(revision, "85" = PEcAn.ED2:::history.r85, ...)