Skip to content

feat: add output argument to daily_to_hourly_lwd() with daily default - #4

Merged
joaobtj merged 1 commit into
masterfrom
feat/daily-output-lwd
Dec 3, 2026
Merged

joaobtj merged 1 commit into
masterfrom
feat/daily-output-lwd

Conversation

@joaobtj

@joaobtj joaobtj commented Dec 2, 2026

Copy link
Copy Markdown
Owner

Summary

  • Added an output = c("daily", "hourly") argument (validated with rlang::arg_match()) to daily_to_hourly_lwd(), setting "daily" as the default resolution.
  • Avoided unnecessary tidyr::unnest() when output = "daily" to improve performance on large daily time series.
  • Fixed NA handling so days with all missing hourly values return NA_real_ instead of 0 in lwd_daily_sum.
  • Updated roxygen2 documentation and explicit @importFrom tags.
  • Expanded unit tests in tests/testthat/test-leaf_wetness.R to cover daily output, hourly output, consistency between both outputs, NA handling, and invalid output values.
  • Updated both English (vignette_leaf_wetness_en.Rmd) and Portuguese (vignette_molhamento_pt.Rmd) vignettes to reflect the new default behavior.

Checks

  • devtools::document()
  • devtools::test()
  • devtools::check() (0 errors, 0 warnings, 0 notes)

@joaobtj
joaobtj merged commit e5eea4a into master Dec 3, 2026
6 checks passed
@joaobtj
joaobtj deleted the feat/daily-output-lwd branch December 3, 2026 12:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant