JohnsonHsieh / iNEXT

R package for interpolation and extrapolation
https://JohnsonHsieh.github.com/iNEXT
57 stars 26 forks source link

Error in matrix that may not be justified #74

Closed RoxanneLeb closed 1 year ago

RoxanneLeb commented 1 year ago

Dear iNEXT team,

I am working on a 9 month old code again, and I got an error that was not there before.

The line of code: iNEXT(count_per_loc_past[[location1]]$abundance, q=0, datatype="abundance")

with count_per_loc_past[[location1]] insect_sp location_3 abundance
1: Anthomyiidae spp. Albulapass 1
2: Dasytidae spp. Albulapass 1
3: Rhamphomyia spp. Albulapass 1
4: Platycheirus melanopsis-fasciculatus Albulapass 1
5: Plebeius glandon Albulapass 1
6: Euphydryas aurinia Albulapass 17

Gives this error: Error in matrix(apply(Abun.Mat, 2, function(x) invChat.Ind(x, q, goalSC)$qD), : (converted from warning) data length [1600] is not a sub-multiple or multiple of the number of rows [24]

I don't understand where this error comes from, as count_per_loc_past is a list and the other [[location1]]$abundance works perfectly.

It would be great if you could take a bit of time to clarify this issue.

Thank you in advance,

Kind regards,

Roxanne

RoxanneLeb commented 1 year ago

The error appears again as a warning message now, so the script works again. Thank you !!

anabbi commented 1 year ago

Hello, My question is related to this issue. I am getting the same warning when I run the iNEXT main function. It is the same code that I used before without any problem. Could you please advise on why the warning is returned? thank you,