Hi everyone!

I have the following difficulties using ggplot2

# My Data
data<-as.data.frame(cbind(a=c(1,1,2,2,2,2,3,3,4), b=c(1,2,3,3,4,4,4,4,4)))

And I would like to plot the frequency-distributions of both variables in
one plot as lines. For both variables the values (1-4) should be on the
x-axys
and the frequency on the y-axis.

I have already found out, that this should work (somehow) using
stat_summary()

Can anyone help me?

library(ggplot2)
p<-ggplot(data=data, aes(a,b) )
p+stat_summary(??)

Thank you very much for help!
David

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to