I need to create separate dataframes out of this one based off of the age column. So one that shows all baby and then respective lengths and location, then teens with lengths and location and so on. Doing this so I can create three separate paired histograms so you can compare baby west vs. east, teen west vs. east, and adult east vs. west.
Age Length Location
Baby 5.6 West
Teen 8 East
Adult 12 East
Adult 6 West
Baby 4 West
I tried ggplot(graph, aes(x= Length, color = Location)) + geom_histogram(fill="white")
but need it separated so its only for one age group instead of all together.
Final destination is R Shiny and being able to change input of ages to populate different west vs east histogram. thanks!