daijiang / phyr

Functions for phylogenetic analyses
https://daijiang.github.io/phyr/
GNU General Public License v3.0
30 stars 10 forks source link

communityPGLMM.plot.re() #40

Open arives opened 5 years ago

arives commented 5 years ago

I couldn't get this to work. There were a variety of error messages, such as

Error in as(as.matrix(Y.mat), "denseMatrix")[, cov_ranef_update[[sp.var]]$tip.label] : invalid or not-yet-implemented 'Matrix' subsetting

It would be nice if somebody could just enter a comunityPGLMM object and have the covariance matrices plotted.

daijiang commented 5 years ago

If the input is a model, it needs to be (x = model name, sp.var = "sp.col.name"). The argument name x is needed because it is not the first argument in the function.

arives commented 5 years ago

I got this:

w <- pglmm(Y ~ U2 + (1|sp__), cov_ranef=list(sp=Vsp), data=data) communityPGLMM.plot.re(x=w, sp.var="sp", site.var="trait") Error in cov_ranef_update[[sp.var]]$tip.label : $ operator is invalid for atomic vectors

From: Daijiang Li notifications@github.com Reply-To: daijiang/phyr reply@reply.github.com Date: Wednesday, July 31, 2019 at 6:31 AM To: daijiang/phyr phyr@noreply.github.com Cc: "Anthony R. Ives" arives@wisc.edu, Author author@noreply.github.com Subject: Re: [daijiang/phyr] communityPGLMM.plot.re() (#40)

If the input is a model, it needs to be (x = model name, sp.var = "sp.col.name"). The argument name x is needed because it is not the first argument in the function.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/daijiang/phyr/issues/40?email_source=notifications&email_token=ACYX6LDLCBXZLYGQRAAOTYLQCFZZVA5CNFSM4IIFTP32YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3G6N3Y#issuecomment-516810479, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ACYX6LHWZDVUZ6H7SLNKDELQCFZZVANCNFSM4IIFTP3Q.

daijiang commented 5 years ago

It is a bug. Can you try cov_randef=list(sp=phylogeny) instead of the matrix?

arives commented 5 years ago

I'm just going into work, so I'll try later this morning.

From: Daijiang Li notifications@github.com Reply-To: daijiang/phyr reply@reply.github.com Date: Wednesday, July 31, 2019 at 7:17 AM To: daijiang/phyr phyr@noreply.github.com Cc: "Anthony R. Ives" arives@wisc.edu, Author author@noreply.github.com Subject: Re: [daijiang/phyr] communityPGLMM.plot.re() (#40)

It is a bug. Can you try cov_randef=list(sp=phylogeny) instead of the matrix?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/daijiang/phyr/issues/40?email_source=notifications&email_token=ACYX6LCR572XNIJWYU45YDTQCF7E5A5CNFSM4IIFTP32YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3HBUHY#issuecomment-516823583, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ACYX6LCH3WMCHUMOFXVJ2U3QCF7E5ANCNFSM4IIFTP3Q.