#' @title ''
#'
#' @description NULL
#'
#' @export
#' @examples ReduceYearlyTemp(x)
ReduceYearlyTemp <- function(min, max) {
if (!all(is.numeric(min), is.numeric(max))) stop('Inputs must be numeric')
mean_max_min <- mean(rowMeans(data.frame(min, max)))
min_temp <- RSFIA::MinMaxByQuarter(min, fun = mean)
max_temp <- RSFIA::MinMaxByQuarter(max, fun = mean)
min_temp_by_Q_val <- round(min_temp$min_val, 2)
min_temp_by_Q_doy <- min_temp$min_loc
max_temp_by_Q_val <- round(max_temp$max_val, 2)
max_temp_by_Q_doy <- max_temp$max_loc
# Returns a named list
out <- data.frame(mean_max_min, min_temp_by_Q_val, min_temp_by_Q_doy,
max_temp_by_Q_val, max_temp_by_Q_doy)
return(out)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.