Hi:
# Generate a factor and a random set of counts/frequencies
df <- data.frame(gp = LETTERS[1:20], frq = rpois(20, 30))
# bar plot in lexicographic order of factor levels
ggplot(df, aes(x = gp)) + geom_bar(aes(y = frq), stat = 'identity')
# bar plot in increasing order of frequency
ggplot(df, aes
On Oct 6, 2010, at 5:19 PM, Morten wrote:
Hi all
I have a large dataframe with (among others) a categorical variable
of 52
levels and would like to create a barplot with the bars ordered in
decreasing frequency of the levels. I belive it is referred to as a
pareto
plot.
Consider a subs
Hi all
I have a large dataframe with (among others) a categorical variable of 52
levels and would like to create a barplot with the bars ordered in
decreasing frequency of the levels. I belive it is referred to as a pareto
plot.
Consider a subset where I keep only the categorical variable in qu
3 matches
Mail list logo