I have a collection of Roman coins that I am trying to present using ggplot in R.
There are 25 different items in the data, but I would like to combine all the items that have only one occurrence in the "OTHER" field, so the graphs are easier to read.
Medium Method Denom Date Era 1 Silver Struck Denarius 112 BCE:111 BCE Period V – c. 119-91 BCE 2 Bronze Cast Χαλκα μεγεθους 181 BCE:174 BCE Period III – c. 187-155 BCE 3 Bronze Struck Litra:Half-litra 269 BCE Period I – 269 - c. 222 BCE 4 Bronze Struck Litra:Half-litra 269 BCE Period I – 269 - c. 222 BCE 5 Silver Struck Didrachm 275 BCE:270 BCE Period I – 269 - c. 222 BCE 6 Bronze Struck Double-litra 275 BCE:270 BCE Period I – 269 - c. 222 BCE
Using the data.frame sample above, the “Denom” column should have every value that happens only once, grouped together and displayed as “others”. I think I should do this in the data before starting the plot. Please point me in the right direction.
Here is the code I use for ggplot if that helps.
ggplot(data=longbadian, aes(x=Era, fill=Denom)) + geom_bar(aes(x=Era2), data = longbadian, stat="bin") + theme(axis.text.x = element_text(angle=75, hjust=1), legend.title=element_blank()) + xlab("Sydenham Periods") + ylab("Coins by Denomination")
Here is a graph example:

source share