r - Issues with eigen.analysis in popbio -
i've been trying calculate demographic rates using 'popbio' package in r. trying sensitivity of eigenvalues keep getting error "error in mod(z$values) : non-numeric argument function". so, tried run example 'popbio' package , got same error. example in package manual:
a<-matrix(c(0,0,2,.3,0,0,0,.6,0), nrow=3,byrow=true) #matrix example ev <- eigen.analysis(a) # calculation of eigenvalues error in mod(z$values) : non-numeric argument function #error example , data
i know function needs matrix. since object "a" matrix, i'm confused on why i'm getting error. on why i'm getting error appreciated! i'm pretty new using r stuff, apologies if wrong place question.
cheers, kevin
if run problems function in add-on package, run through each line of code , ask more general question. example,
type
eigen.analysis
, hit return see code below (and line 4 call modulus used damping ratio)ev <- eigen(a) lmax <- which.max(re(ev$values)) lambda <- re(ev$values[lmax]) dr <- rle(round(mod(ev$values), 5))$values ...
if error running
a <- matrix(c(0,0,2,.3,0,0,0,.6,0), nrow=3,byrow=true) ev <- eigen(a) mod(ev$values)
then ask question on stack overflow instead.
- just guess, i'm not sure why see error in mod(z$values) instead of mod(ev$values) unless have updated eigen.analysis script.
Comments
Post a Comment