BrunaLab / bdffpRain

R package for rain gauge data from the Biological Dynamics of Forest Fragments Project.
MIT License
0 stars 0 forks source link

Inf in SPEI #17

Closed Aariq closed 4 years ago

Aariq commented 4 years ago

There are infinite values in the SPEI wide form dataset for some reason

Aariq commented 4 years ago

There's only one row with -Inf in the "mon_precip_spi_imputed.csv" file.

Aariq commented 4 years ago

I tracked it down to a single value in a single imputation in imputation.R. I don't know why SPEI was -Inf for this particular month/year/site. Now any Inf values are replaced with NA before taking the mean of all imputations (with na.rm = TRUE)