Created
April 8, 2018 12:10
-
-
Save josephlewis/60e90cd1ffaffa77d20ea4efb489b5fb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
> head(xtestbuffer) | |
battlefield.no distance decade | |
1200s NA 1000 1200s | |
1300s 0.20000000 1000 1300s | |
1400s NA 1000 1400s | |
1500s NA 1000 1500s | |
1600s 0.05882353 1000 1600s | |
1700s 0.20000000 1000 1700s | |
decbuf <- ggplot(xtestbuffer) + | |
geom_bar(aes(x = decade, y = battlefield.no), colour = stat = "identity") + | |
scale_fill_manual(values = c('#de2d26', 'gainsboro') ) + | |
facet_wrap(~distance, nrow = 1) + | |
labs(x = "Decade", y = "Proportion of Battlefields with\ndistance from Roman roads") + | |
scale_y_continuous(labels = scales::percent) + | |
theme_classic() | |
# I want to create another column that says which battlefield.no is max within each distance group. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment