R/country_analysis.R

Defines functions country_analysis

Documented in country_analysis

#' Country analysis
#'
#' @param country the country you want to analyze
#'
#' @return the graph with the evolution of the main indicators
#' @import dygraphs
#' @import tidyverse
#' @export
#'
#' @example
#' country_analysis("France)
#'
country_analysis <- function(country){
  data_Happiness %>%
    group_by(Country) %>%
    filter(Country == country) %>%
    select(-Dystopia.Residual, - Happiness.Rank, - Happiness.Score) %>%
    dygraph()

}
alexchouraki/ProjetAlex documentation built on May 28, 2019, 4:54 p.m.