#' @export
addCelsiusColumn <- function(temperatures) {
temperatures %>%
dplyr::mutate(celsius = (value - 32) * 5/9) %>%
dplyr::rename(fahrenheit = value)
}
#' @export
summariseAvgTemperatureByYear <- function(temperatures) {
temperatures %>%
dplyr::group_by(year) %>%
dplyr::summarise(avgTemperature = mean(celsius))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.