View source: R/calc_epidemic_onset.R
| calc_epidemic_onset | R Documentation | 
Calculate epidemic onset
calc_epidemic_onset(start, end, c_closure, weather, cultivar_sus = 5)
start | 
 POSIXct, start date in which to begin calculating the epidemic onset, if not specified, the first date in the weather data will be used.  | 
end | 
 POSIXct, end date, last date to complete calculating the epidemic onset, if not specified, the last date in the weather data will be used.  | 
c_closure | 
 POSIXct formatted date to start the model running the model This is usually at canopy closure (Wolf)  | 
weather | 
 data.table, formatted with   | 
cultivar_sus | 
 numeric, susceptibility of the cultivar on the 'bsa' https://www.bundessortenamt.de variety list. Susceptibility rating must range between 1 and 9. 1 = resistant, 9 = susceptible. Default is 5.  | 
If the input weather is conducive for epidemic, the function returns a POSIX_ct date when epidemic commences. If no epidemic occurs, a numeric, proportion indicating the progress an epidemic is returned
wethr <- read.csv(system.file("extdata", "clean_weather.csv",
                  package = "cercospoRa"))
wethr <- format_weather(wethr,time_zone = "UTC")
calc_epidemic_onset(start = as.POSIXct("2022-04-25",tz = "UTC"),
                    end = as.POSIXct("2022-09-30",tz = "UTC"),
                    c_closure = as.POSIXct("2022-07-01",tz = "UTC"),
                    weather = wethr)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.