lamho86 / phylolm

GNU General Public License v2.0
30 stars 12 forks source link

How to solve "Error in lenth(taxa_without_data) : could not find function "lenth"" #24

Closed jeagull closed 4 years ago

jeagull commented 4 years ago

I am trying to use phylolm in the near future and I am running the example in the Rdocumentation as shown

set.seed(123456)
tre = rtree(50)
x = rTrait(n=1,phy=tre)
X = cbind(rep(1,50),x)
y = rbinTrait(n=1,phy=tre, beta=c(-1,0.5), alpha=1 ,X=X)
dat = data.frame(trait01 = y, predictor = x)
fit = phyloglm(trait01~predictor,phy=tre,data=dat,boot=100)
summary(fit)
coef(fit)
vcov(fit)

and I get the error

Error in lenth(taxa_without_data) : could not find function "lenth"

when I try to run the fit = phyloglm... bit of the code. Can you tell me what the issue is and give me suggestions on what I can do to avoid this?

lamho86 commented 4 years ago

Hello,

The problem should be fixed by now. Please update the lasted version.

Best, Lam

Lam Ho | Assistant Professor FACULTY OF SCIENCE Department of Mathematics and Statistics 902.494.1069

Dalhousie University dal.ca

On Aug 20, 2019, at 5:24 AM, jeagull notifications@github.com wrote:

I am trying to use phylolm in the near future and I am running the example in the Rdocumentation as shown

set.seed(123456) tre = rtree(50) x = rTrait(n=1,phy=tre) X = cbind(rep(1,50),x) y = rbinTrait(n=1,phy=tre, beta=c(-1,0.5), alpha=1 ,X=X) dat = data.frame(trait01 = y, predictor = x) fit = phyloglm(trait01~predictor,phy=tre,data=dat,boot=100) summary(fit) coef(fit) vcov(fit) and I get the error

Error in lenth(taxa_without_data) : could not find function "lenth" Can you tell me what the issue is and give me suggestions on what I can do to avoid this?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/lamho86/phylolm/issues/24?email_source=notifications&email_token=ABW3HP7ZZVYKZCSQQAYGABDQFOS2VA5CNFSM4INRVS5KYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HGFU6AA, or mute the thread https://github.com/notifications/unsubscribe-auth/ABW3HPZ6XRDRDCTEQXL3GUDQFOS2VANCNFSM4INRVS5A.

cecileane commented 4 years ago

Thank you so much @jeagull for opening this issue! highly appreciated. I'm sorry for the trouble.