Result of Query
library(readr)
library(dplyr)
library(tidyr)
library(lubridate)
r <- read.csv('/Users/akul/Downloads/HireArt - Data Analyst Exercise 10.12.17 - Sheet1.csv')
r$Date.of.Contact <- as.Date(r$Date.of.Contact)
r$Month <- month(r$Date.of.Contact)
r %>% mutate(total = n()) %>%
group_by(Month) %>%
mutate(count_n = n(), percentage = count_n/total) %>%
arrange(desc(percentage)) %>%
head(n=1) %>%
select(Month,percentage)
## # A tibble: 1 x 2
## # Groups: Month [1]
## Month percentage
## <dbl> <dbl>
## 1 10 0.2127872