I want to create grouped boxplots by filtering data in one column by years < 1993 and years > 1993
library(tidyverse)
library(data.table)
months <- c(7,7,7,7,7,8,8,8,8,8)
years <- c(1991,1992,1993,1994,1995,1991,1992,1993,1994,1995)
values <- c(12.1,11.5,12.0,12.4,12.2,11.8,11.4,12.2,11.8,12.0)
dt <- data.table(month=months,year=years,value=values)
aug_dt_lessthan1993 <- dt %>%
filter(month==8,year<1993)
aug_dt_greaterthan1993 <- dt %>%
filter(month==8,year>1993)
p <- ggplot(aug_dt_lessthan1993, aes(x=1,y=value,fill=))
Can I use fill for this?
Is there an easy way keep all the data in one data.table? And create grouped boxplots by filtering the years variable?
