I can plot this like this:
qplot(data=test, x=Summative.Rating, y=Match.Rate, geom="bar")
but the label on the x-axis turns out as "Summative.Rating". If I change
the name of the column to "Summative Rating" and make the qplot call:
qplot(data=test, x="Summative Rating", y="Match.Rate", geom="bar")
it just gives me one bar of hight "Match.Rate", labeled "Summative
Rating".
When I use this:
ggplot(data=test, aes(x="Summative Rating", y=Match.Rate))+geom_bar(stat="identity")
I get one bar of height 92.xx, which is the sum of the Match.Rates.
I know I can change the axis labels using xlab() and ylab() but I don't
understand why I only get one bar. Can someone explain this to me?
--
Stuart Luppescu -=- slu .at. ccsr.uchicago.edu
University of Chicago -=- CCSR
才文と智奈美の父 -=- Kernel 3.2.1-gentoo-r2
Michael Dewey: When I started I found the free
documents useful but I made most progress when I
bought MASS. I do realise that liking books is a
bit last millennium. Thomas Lumley: Very late last
millenium, though. "When I were young[er] we
didn't have all these fancy yellow books." --
Michael Dewey and Thomas Lumley (about different
kinds of documentation for R) R-help
(January 2006)
This works for me in 0.9.0:
DF <- read.table(textConnection("
Unsatis 16.66667
Basic 14.70588
Profic 41.22807
Disting 19.56522"), header = FALSE)
names(DF) <- c('Summative Rating', 'Match Rate')
# Note the backticks:
ggplot(DF, aes(x = `Summative Rating`, y = `Match Rate`)) +
geom_bar()
Why you would want to use a bar chart to display numeric summaries is
another issue.
Dennis
Aha. Backticks! Thanks, Dennis.
> Why you would want to use a bar chart to display numeric summaries is
> another issue.
Better than a pie chart. ;-) Actually, this is just a simplified piece
of the whole display.
--
Stuart Luppescu -=- slu .at. ccsr.uchicago.edu
University of Chicago -=- CCSR
才文と智奈美の父 -=- Kernel 3.2.1-gentoo-r2
Knut Krueger: Is there any function available to
combine those p values? Stephan Kolassa: ?"+"
-- Knut Krueger and Stephan Kolassa (about ways to
combine p values from different tests)
R-help (July 2010)