powered by
Takes two vectors x and y and plots M=y-x versus A=(x+y)/2. If the vectors a more longer than length n the data is sampled to size n. A smooth curve is added to show trends.
maplot( x, y, n = 10000, subset = NULL, xlab = NULL, ylab = NULL, curve.add = TRUE, curve.col = 2, curve.span = 1/2, curve.lwd = 2, curve.n = 2000, ... )
a numeric vector
a numeric value. If length(x) is larger than n, the x and y are sampled down.
length(x)
n
x
y
index of the points to be plotted
a title for the x axis
a title for the y axis
if TRUE a smooth curve is fit to the data and displayed. The function loess is used to fit the curve.
TRUE
loess
a numeric value that determines the color of the smooth curve
is passed on to loess as the span argument
span
the line width for the smooth curve
a numeric value that determines the sample size used to fit the curve. This makes fitting the curve faster with large datasets
further arguments passed to plot
plot
Rafael A. Irizarry
n <- 10000 signal <- runif(n,4,15) bias <- (signal/5 - 2)^2 x <- signal + rnorm(n) y <- signal + bias + rnorm(n) maplot(x,y)
Run the code above in your browser using DataLab