[R] Problem with memory footprint of qq plot generated with lattice

dhinds@sonic.net dhinds at sonic.net
Thu Sep 29 01:53:02 CEST 2005


nwew <W.E.Wolski at newcastle.ac.uk> wrote:
> Dear R helpers,

> I generate a qq plot using the following function call.

...

> dim(xx)
> [1] 680237      2

How about doing something like this:

fn <- function(n,cut=0.001,m=1000)
{
    p <- ppoints(n)
    p <- p[pmin(p, 1-p) < cut]
    q <- pt(seq(qt(cut,df=19),qt(1-cut,df=19),length=m),df=19)
    sort(c(p,q))
}

then adding 'f.value=fn' to your qqmath arguments?  This essentially
says, plot the individual data points in the extreme tails of the
distribution (p < 0.001 or p > 0.999), and evaluate the distribution
at a sparse set of points in between, where the density means you
can't discern the individual values anyway.

-- Dave




More information about the R-help mailing list