Closed cboettig closed 8 years ago
It looks like fitDiscrete takes numeric (doubles) but not integer-valued traits? From the example,
fitDiscrete
## match data and tree tmp=get(data(geospiza)) td=treedata(tmp$phy, tmp$dat) geo=list(phy=td$phy, dat=td$data)
And now let's use as.integer to make sure we're actually using discrete values instead of continuous values:
as.integer
gb= as.integer(round(geo$dat[,5])) ## create discrete data names(gb)=rownames(geo$dat) tmp=fitDiscrete(geo$phy, gb, model="ER", control=list(niter=5), ncores=2)
I get this error:
.check.states(tree, states, strict.vals = 1:k) : The states vector must contain names
Of course dropping the as.integer things work fine. Maybe I'm missing something here.
@cboettig fixed with https://github.com/mwpennell/geiger-v2/pull/17 :neckbeard:
nice, thanks!
It looks like
fitDiscrete
takes numeric (doubles) but not integer-valued traits? From the example,And now let's use
as.integer
to make sure we're actually using discrete values instead of continuous values:I get this error:
Of course dropping the
as.integer
things work fine. Maybe I'm missing something here.