boshek / rsoi

Import Climate Indices into R
https://boshek.github.io/rsoi/
18 stars 5 forks source link

Fix create_csv #16

Closed eliocamp closed 4 years ago

eliocamp commented 4 years ago

The create_csv() argument doesn't seem to work.

rsoi::download_enso(create_csv = TRUE)
#> Error in is.data.frame(x): object 'enso' not found

The problem is that download_enso() tried to save it before it was loaded. This fixes the issue.

boshek commented 4 years ago

This is great! Thanks so much. Would you be willing to add a unit test here so that we don't run into this situation again?

eliocamp commented 4 years ago

There! I'm not the best unit-tester, but I think this would be fine.