Closed Aariq closed 1 year ago
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
history
history.r46
data()
<revision>
https://github.com/PecanProject/pecan/blob/ab55731c300e7eb0d97b04fe30b97cb405dccba5/models/ed/R/write.configs.ed.R#L451
Internal data should be referenced with packagename:::dataset, so I'll replace the non-functioning code with a switch() statement like:
packagename:::dataset
switch()
edhistory <- switch(revision, "85" = PEcAn.ED2:::history.r85, ...)
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 brokenhttps://github.com/PecanProject/pecan/blob/ab55731c300e7eb0d97b04fe30b97cb405dccba5/models/ed/R/write.configs.ed.R#L451
Proposed solution
Internal data should be referenced with
packagename:::dataset
, so I'll replace the non-functioning code with aswitch()
statement like: