I want to compare two histograms in a graph in R, but couldn't imagined and implemented. My histograms are based on two sub-dataframes and these datasets divided according to a type (Action, Adventure Family) My first histogram is:
split_action <- split(df, df$type)
dataset_action <- split_action$Action
hist(dataset_action$year)
split_adventure <- split(df, df$type)
dataset_adventure <- split_adventure$Adventure
hist(dataset_adventure$year)
I want to see how much overlapping is occured, their comparison based on year in the same histogram. Thank you in advence.