goldfish
goldfish copied to clipboard
`nodes` and `nodes2` name objects conflict
Discussed in https://github.com/snlab-ch/goldfish/discussions/49
Originally posted by meakbiyik September 8, 2021 Hi all, I got a weird error during preprocessing phase and cannot seem to find the reason. Here's the code and backtrace:
rate_model_preprocessing <- estimate(
rate_formula,
preprocessingOnly = TRUE,
model = "DyNAM",
subModel = "rate"
)
Error in object[[name, exact = TRUE]] : subscript out of bounds
Backtrace:
1: getElement(get(row$nodeset, envir = envir), row$attribute)
2: getElementFromDataObjectTable(objectNameTable, envir = envir)
3: imputeMissingData(objectsEffectsLink, envir = prepEnvir)
4: preprocess(model, subModel, events = events, effects = effects,
5: estimate.formula(rate_formula, preprocessingOnly = TRUE, model = "DyNAM",
6: estimate(rate_formula, preprocessingOnly = TRUE, model = "DyNAM",
I know that this is not much to work on, but I am unfortunately unable to share the data and for all purposes, it looks fine. At this point, I am just looking for an idea: this seems to be somewhat connected to #5 but my R knowledge is not good enough to understand what is going on.
Thanks in advance!
Preprocessing functions use the same names for objects. When it tries to get the info from the nodes data frame it gets a character vector instead.
Until this bug is fixed the nodes
and nodes2
object names should be avoided to name the nodes' data frames.