Skip to content

Commit

Permalink
As per discussion in issue #22
Browse files Browse the repository at this point in the history
  • Loading branch information
PaulMelloy committed Jul 30, 2024
1 parent 8f83eff commit 0edd9ff
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
4 changes: 3 additions & 1 deletion R/latent_period.R
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#' Calculate Cercospora latent period
#'
#' @details Calculates the latent period for *Cercospora beticola* infections on
#' sugar beet
#' sugar beet. Note the published formula in \insertCite{wolf_factors_2005}
#' contains an error in the exponent. e(0.35 x (Tm - 10)) should be
#' e(-0.35 x (Tm - 10)). See issue #22 on github for additional information.
#'
#' @param Tm numeric, Average temperature in degrees Celsius for a hour of the day
#' @param ref character, method for calculating latent period. Default is `"wolf"`
Expand Down
5 changes: 5 additions & 0 deletions tests/testthat/test-thermal_functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,8 @@ test_that("moisture_index(method =2) examples work", {
expect_equal(moisture_index(55,rh_thresh = 50, method = 2), 0.00540259, tolerance = 0.00001)
})

# see issue #22
plot(latent_period(9:35), x = 9:35,
xlab = "Temperature C",
ylab = "days",
pch = 16)

0 comments on commit 0edd9ff

Please sign in to comment.