Hi:
Here's a lattice version:
y <- rbeta(1, 2, 5)
densityplot( ~ y, xlim = c(0, 1), plot.points = FALSE,
panel = function(x, y, ...) {
p <- seq(0.001, 0.999, by = 0.001)
panel.densityplot(x, col = 'blue', ...)
panel.xyplot(p, dbeta(p, 2
On 2011-03-19 19:15, Jim Silverton wrote:
Suupose I have
y<- rbeta(1, 2, 5)
and I only want to see only the density plot from x = 0 to x = 1
How do I do this?
I'm not quite sure what you want, but this may be it:
plot(density(y), xlim = c(0, 1), xaxs = 'i')
Peter Ehlers
2619
email: rvarad...@jhmi.edu
- Original Message -
From: Jim Silverton
Date: Saturday, March 19, 2011 10:16 pm
Subject: Re: [R] Part of a density plot
To: r-help@r-project.org
> Suupose I have
> y <- rbeta(1, 2, 5)
> and I only want to see only the density plot from x =
Suupose I have
y <- rbeta(1, 2, 5)
and I only want to see only the density plot from x = 0 to x = 1
How do I do this?
--
Thanks,
Jim.
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/li
4 matches
Mail list logo