I have 10,000 trees, as individual .tre files, in my working directory, but I can't seem to load them all into R.
I tried this:
library(ape)
temp=list.files(pattern="*.tre")
mamtrees=lapply(temp,read.tree)
Which yielded the following error message:
Error in nchar(tree) : invalid multibyte string, element 592
In addition: Warning message:
In grepl("'", tree) : input string 592 is invalid in this locale
Any suggestions would be much appreciated!