[R] plot probability density function (pdf)
R. Michael Weylandt
michael.weylandt at gmail.com
Wed Oct 12 18:27:20 CEST 2011
Assuming you mean you want them on the same device:
layout(1:2)
plot(density(a))
lines(density(d),col=2)
plot(density(b))
lines(density(e),col=2)
Getting your data into R is more of a challenge, but if you want my
unsolicited advice, you can do far worse than saving as CSV and using
read.csv()
Michael
On Wed, Oct 12, 2011 at 10:31 AM, pigpigmeow <glorykwok at hotmail.com> wrote:
> however, if i have an excel file, but there have 6 variables, a,b,c,d,e,f.
>
>
> how to plot the probability density function of a and d in one graph, b and
> e in another graph?
>
>
> --
> View this message in context: http://r.789695.n4.nabble.com/plot-probability-density-function-pdf-tp3897055p3898183.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at 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.
>
More information about the R-help
mailing list