0

I am trying to run the following lines of code:

tree <- read.nexus("~/Dropbox/Billfishes/Analysis/Phylogenies/Fish_12Tax_time_calibrated.tre");
characterTable <- read.csv("~/Dropbox/Billfishes/Analysis/CodingTableThresh95.csv", row.names = 1);
treeWData <- treedata(tree, characterTable, sort = T);

When I ran this code last week, it worked. I then updated all my packages as part of routine maintenance, and now I get this error:

Error in integer(max(oldnodes)) : vector size cannot be infinite In addition: Warning message: In max(oldnodes) : no non-missing arguments to max; returning -Inf

I've tried rolling back to previous versions of R (I'm currently running R version 3.4.0 in RStudio 1.0.143; geiger is version 2.0.6), reading the tree in as a Newick, and trying other tree files, always resulting in the same error. When I try using other tree and character datasets, I do not get the error.

Any ideas what this error means, and/or how to get this code to run without throwing this error?

Hannah O.
  • 383
  • 2
  • 12
  • Error messages by themselves are hard to diagnose. It would be easier to help if you provided a [reproducible example](https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) with sample input data. It doesn't have to be your own data, just something that reproduces the error. – MrFlick Jul 10 '17 at 14:14
  • Here's a link to a folder with the data that will produce the error: https://www.dropbox.com/sh/mxpbm6yie8w60fe/AADgosDs0xJUK0ym02U19rvga?dl=0 – Hannah O. Jul 10 '17 at 17:11

1 Answers1

1

After careful error checking, I discovered that the taxon names in the phylogeny file were separated by underscores, whereas the taxon names in the table used camel caps. Thus, the error was thrown because no taxa in the phylogeny mapped to the character table.

Hannah O.
  • 383
  • 2
  • 12