ericgoolsby / Rphylopars

Phylogenetic Comparative Tools for Missing Data and Within-Species Variation
28 stars 11 forks source link

R aborts when trying to run phyhlopar model #36

Closed achazhardenberg closed 4 years ago

achazhardenberg commented 4 years ago

Hi, R aborts the session with a fatal error when I try to run phylopar with the following code:

library(ape)
library(phytools)
library(mvtnorm)
library(Rphylopars)
library(geiger)
library(caper)

primates.tree <- read.nexus("consensusTree_10kTrees_Primates_Version3-2.nex")
plot(primates.tree,cex=0.5)
is.ultrametric(primates.tree)
is.rooted(primates.tree)
primates.tree<-chronos(primates.tree)
tree<-primates.tree
plot(tree,cex=0.5)
summary(tree)
PrimateData <- read.csv("DataToBeAnalyzed5.csv")
row.names(PrimateData)<-PrimateData$species
summary(PrimateData)
name.check(PrimateData,tree)

p_BM<-phylopars(trait_data=PrimateData,tree=primates.tree)

It aborts also if I do not transform the tree to ultrametric with chronos(). I attach the original data for REPEX.

Thanks for any help! Achaz

Archive.zip

achazhardenberg commented 4 years ago

I found the offending mistake. one of the species in the data.frame had the species name in Genus_species capitalised and name.check apparently is not case sensitive (I found out).