--- title: "DSC-WAV Getting Started in RStudio" author: "XX YOUR NAME HERE XX" date: "June 4, 2021" output: pdf_document: fig_height: 3 fig_width: 5 html_document: fig_height: 3 fig_width: 5 word_document: fig_height: 3 fig_width: 5 --- ```{r, setup, include=FALSE} library(tidyverse) # Load additional packages here library(babynames) knitr::opts_chunk$set( tidy=FALSE, # display code as typed size="small") # slightly smaller font for code ``` ## Let's explore the history of babynames over time This RMarkdown file is intended to help you get started with R and RStudio. We use data from 1880-2017 from the United States Social Security Administration as made available through the `babynames` package in R (https://cran.r-project.org/web/packages/babynames/index.html). ```{r} name_of_interest <- "Andrea" glimpse(babynames) single_name <- babynames %>% filter(name == name_of_interest) %>% group_by(year) %>% summarize(prop = sum(prop)) ``` ```{r} glimpse(single_name) ``` ```{r} ggplot( single_name, aes(x = year, y = prop) ) + geom_line() + labs(x = "Year", y = "Proportion of births", title = paste0("Name: ", name_of_interest)) ```