#' Draw the evolution of the occurences of different names
#'
#' @param names the names you want to observe
#'@import dplyr tidyr ggplot2 prenoms
#' @return a ggplot graph.
#' @export
#'
#' @examples
#' \dontrun{
#' draw_names(c("Sacha","Hugo",...))
#' }
draw_names <- function(names){
assert_that(is.character(class(names)))
data("prenomDB")
prenomsDB %>% filter(name %in% names) %>%
group_by(year,name) %>%
summarize(count=n()) %>%
ggplot(aes(x=year, y=count,color=name))+ geom_line()
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.