Help with plotting diversification rates using LASER
1
0
Entering edit mode
8.9 years ago

Hi,

I have been trying to use the LASER package in R to plot rates of diversification for my data. However, I am running into the following error.

plotRate(v,pars)
Error in pars$lam0 : $ operator is invalid for atomic vectors

v is my numeric vector of branch lengths, pars is a list with the 4 parameters (lam0, k, mu0, z) that I entered manually after fitting the different models - fitSPVAR, fitEXVAR, fitBOTHVAR and checking the values I get each time.

Is there anything inconsistent with the kind of data I should be entering? I'd be grateful if anyone can point me in the right direction.

LASER Phylogenetics R • 1.7k views
ADD COMMENT
0
Entering edit mode

What happens if you try to access pars$lam0? e.g summary(pars$lam0) or head(pars$lam0). And how did you created pars?

ADD REPLY
0
Entering edit mode

I created pars as a list. pars=c(lam0, k, mu0, z) where the 4 parameters are all numeric values

ADD REPLY
0
Entering edit mode
8.9 years ago
h.mon 35k

According to your comment, you did not create a list, just a vector. Try this:

pars <- as.list( c( lam0 = 1, k = 2, mu0 = 3, z = 4 ) )
ADD COMMENT

Login before adding your answer.

Traffic: 1627 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6