#' average arrival delay
#'
#' this plots the avg arrival delay for american airlines flights departed from NYC
#'
#' @export
avgarr_delay <- function(){
arrdelay <- aa[aa$arr_delay >= 0, ] #negative time is not delay
sprintf("For American Airlines, the average arrival delay in 2013 was: %f minutes", mean(arrdelay$arr_delay , na.rm = T))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.