Created
July 13, 2014 13:47
-
-
Save blackfist/40d608a3d39c4e24c6dc to your computer and use it in GitHub Desktop.
I'd like to know why this bar chart isn't sorted even though the data frame that I sent to it is.
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
library(ggplot2) | |
library(plyr) | |
library(verisr) | |
load("~/Documents/vzdata/verisr_object/verisr2.dat") | |
patterns <- as.data.frame(table(vz$pattern)) | |
names(patterns) <- c("Pattern", "Count") | |
patterns <- arrange(patterns, desc(Count)) | |
print(patterns) | |
ggplot(patterns, aes(x=Pattern, y=Count)) + geom_bar(stat="identity") + coord_flip() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment