bfast2 / bfast

Breaks For Additive Season and Trend
https://bfast2.github.io
GNU General Public License v2.0
41 stars 15 forks source link

Error in RSS.table[as.character(opt[1]), i] : subscript out of bounds for bfastlite in R #109

Open mohammad-a-sh opened 9 months ago

mohammad-a-sh commented 9 months ago

Hello,

I have developed a code for BFAST, and when executed for the BFAST family (bfast, bfastmonitor, etc.), it runs without any issues. However, upon attempting to run "bfastlite", I encountered the following error:

Error in RSS.table[as.character(opt[1]), i] : subscript out of bounds

I am now seeking guidance on whether this error is related to my dataset, the code I have written, or the bfastlite package itself, and how I can resolve it.

Thank you.

GreatEmerald commented 8 months ago

Could you provide a reprex? Generally that error means that the triangular matrix of optimal break locations did not get computed correctly for some reason.

mohammad-a-sh commented 8 months ago

Thank you for your guidance. The path you mentioned will be lengthy. Is it possible to send you the data and code via email or send it here?

GreatEmerald commented 8 months ago

Please try to make a minimal reproducible example, see here for some suggestions: https://stackoverflow.com/help/minimal-reproducible-example For instance, provide only the one pixel that causes the issue, not your whole dataset. Only provide your call to bfastlite, not any unrelated code for loading the data etc.