oschwery / MonoPhy

R package to explore monophyly
6 stars 3 forks source link

Duplicate row names, and NA being evaluated in if statements #71

Open bomeara opened 2 years ago

bomeara commented 2 years ago
solution0 <- AssessMonophyly(phy3, outliercheck=FALSE)
Error in `.rowNamesDF<-`(x, value = value) :
  duplicate 'row.names' are not allowed
In addition: Warning message:
non-unique values when setting 'row.names'

I think it's line 348 of AssessMonophyly.R: rownames(outframe) <- outframe[, 1] # assign first column as row names

For the same tree (attached):

 solution0 <- AssessMonophyly(phy3, outliercheck=TRUE)
Error in if (outframe[tip.states.matrix[i, 2], "Monophyly"] == "Monotypic") { :
  missing value where TRUE/FALSE needed

Which I think is line 367 of AssessMonophyly.R: } else if (outframe[tip.states.matrix[i, 2], "Monophyly"] == "Monotypic") { # ...if species is monotypic...

sponges.txt