View source: R/fire_index_functions.r
1 | index_FFDI_DF(Temperature, DF, Humidity, Wind)
|
Temperature |
|
DF |
|
Humidity |
|
Wind |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | ##---- Should be DIRECTLY executable !! ----
##-- ==> Define data, use random,
##-- or do help(data=index) for the standard data sets.
## The function is currently defined as
function (Temperature, DF, Humidity, Wind)
{
McA <- 0
McA_list <- c()
llength <- length(Temperature)
for (day in 1:llength) {
F <- 2 * exp(-0.45 + 0.987 * log(DF[day] + 0.001) - 0.0345 *
Humidity[day] + 0.0338 * Temperature[day] + 0.0234 *
Wind[day])
McA_list <- append(McA_list, F)
}
McA_list
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.