ajbc / trellis

Other
9 stars 3 forks source link

Flat model "mantitles" incorrect #91

Closed jacob-z closed 6 years ago

jacob-z commented 6 years ago

In Tree view I have a list of 14 manually annotated labels. One of these labels is "Games" and occurs at the bottom of the list. I can export the flat model, but when I load it into R I get the following list:

> mantitles

[[1]]
NULL

[[2]]
NULL

[[3]]
NULL

[[4]]
NULL

[[5]]
NULL

[[6]]
NULL

[[7]]
NULL

[[8]]
NULL

[[9]]
[1] "Games"
jacob-z commented 6 years ago

bug is in line 216, currently reads

if (i <= length(stateStore$manual.titles) && !is.null(stateStore$manual.titles[[i]])) {
      flat.mantitles[[i]] <- stateStore$manual.titles[[idlist[[i]]]]
}

should read

if (i <= length(stateStore$manual.titles) && !is.null(stateStore$manual.titles[[idlist[[i]]]])) {
        flat.mantitles[[i]] <- stateStore$manual.titles[[idlist[[i]]]]
}
AFriendlyRobot commented 6 years ago

Issue was an incorrect indexing (occurring twice in one line) when checking for valid manual titles to export. See PR #92