I got the following error message when I called phylopars() and passed a data frame to trait_data that did not have the first column named species. The first column contained species IDs but had a different name.
Error in tp(L = X, R = R, Rmat = as.matrix(Rmat), mL = ncol(X), mR = 1, : Mat::operator(): index out of bounds In addition: Warning messages: 1: In max(table(as.character(trait_data$species))) : no non-missing arguments to max; returning -Inf 2: In max(table(as.character(trait_data$species))) : no non-missing arguments to max; returning -Inf
This took me a long time to debug. It would be nice to either remove the requirement that the name be species or to make the error message more transparent. Thanks and I appreciate the great R package!
I got the following error message when I called
phylopars()
and passed a data frame totrait_data
that did not have the first column namedspecies
. The first column contained species IDs but had a different name.Error in tp(L = X, R = R, Rmat = as.matrix(Rmat), mL = ncol(X), mR = 1, : Mat::operator(): index out of bounds In addition: Warning messages: 1: In max(table(as.character(trait_data$species))) : no non-missing arguments to max; returning -Inf 2: In max(table(as.character(trait_data$species))) : no non-missing arguments to max; returning -Inf
This took me a long time to debug. It would be nice to either remove the requirement that the name be
species
or to make the error message more transparent. Thanks and I appreciate the great R package!