#' Movies with above average budgets
#'
#' This function lists the movies which have above average budgets for a selected year
#'
#' @param n Year / must be in between 2009 - 2011
#' @return Movie names
#' @export
#' @examples
#' \dontrun{
#' aboveavr ()
#' aboveavr (2009)
#'
#'}
#'
aboveavr <- function(n){
movies$Films[movies$BudgetinMillions>mean(subset(movies,Year == n)$BudgetinMillions) &
movies$Year== n]
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.