ltrr-arizona-edu / burnr

🔥 Forest fire history analysis in R.
https://ltrr-arizona-edu.github.io/burnr/
15 stars 8 forks source link

intervals() calculates negative means on long chronologies #204

Open chguiterman opened 1 year ago

chguiterman commented 1 year ago

Based on how R sorts years when their length changes, composite() places pre-1000 CE dates after post-1000 CE dates. This results in intervals() calculating negative (and totally erroneous besides) intervals. For example,

image

The second column are years, and note that the year 817 CE comes after 1879 CE. This results in -1062 year interval...

To fix it, I'll sort the years entering intervals()

brews commented 1 year ago

Man, thanks for catching this, @chguiterman 👍