lines.rv {rv} | R Documentation |
Adds a sample of line segments randomly drawn from the joint distribution of
(x,y)
.
## S3 method for class 'rv': lines(x, y, type="l", ...)
x, y |
coordinate vectors of points to join |
type |
character indicating the type of plotting, currently 'l' and 'p' are the only possibilities |
... |
further arguments passed to points |
The size of the sample (number of segments drawn)
is determined by
rvpar(line.sample)
.
lines.rv
is implemented as part of points.rv
.
See points.rv
for details of the parameters.
Jouni Kerman kerman@stat.columbia.edu http://www.stat.columbia.edu/~kerman
Kerman, Jouni and Gelman, Andrew. Manipulating and Summarizing Posterior Simulations Using Random Variable Objects. Technical report, Columbia University, New York.
x <- 1:10 y <- rvnorm(mean=x) par(mfrow=c(2,2)) plot(x, y, type="b", main="Intervals and random lines", rvcol="blue", col="gray") plot(x, y, type="l", main="Only random lines", col="gray") plot(as.rv(x), E(y), type="b", main="Means, connected by a constant line", rvcol="blue", col="gray") plot(y, x, type="l", main="Only random lines", col="gray")