GotelliLab / EcoSimR

Repository for EcoSimR, by Gotelli, N.J. , Hart E. M. and A.M. Ellison. 2014. EcoSimR 0.1.0
http://ecosimr.org
Other
29 stars 10 forks source link

RA1 returns 1D matrix with example data set #6

Closed emhart closed 10 years ago

emhart commented 10 years ago

the code RA1(macwarb) returns a matrix that throws an error with the Pianka metric. This is because RA1 returns:

 [,1]     [,2]      [,3]      [,4]      [,5]      [,6]     [,7]      [,8]     [,9]     [,10]
[1,] 0.4076 0.633725 0.5044575 0.6635675 0.8789925 0.2179653 0.209956 0.7695814 0.220267 0.2328854
        [,11]     [,12]    [,13]     [,14]     [,15]     [,16]
[1,] 0.884197 0.9193044 0.574637 0.4272182 0.9468288 0.2616613

Seems like RA1 needs to be fixed.

emhart commented 10 years ago

Looks like the issue here is that the function uses length to figure out the dimensions of the matrix. It should use a different method.