https://github.com/cran/fields
Raw File
Tip revision: 6c8b30169bba182a68765ee3cb9b4e2ef7d38332 authored by Doug Nychka on 16 November 2011, 00:00:00 UTC
version 6.6.3
Tip revision: 6c8b301
bplot.xy.R
# fields, Tools for spatial data
# Copyright 2004-2011, Institute for Mathematics Applied Geosciences
# University Corporation for Atmospheric Research
# Licensed under the GPL -- www.gpl.org/licenses/gpl.html
"bplot.xy" <- function(x, y, N = 10, breaks = pretty(x, 
    N, eps.correct = 1), style = "tukey", outlier = TRUE, plot = TRUE, 
    xaxt = "s", ...) {
    out <- list()
    NBIN <- length(breaks) - 1
    centers <- (breaks[1:NBIN] + breaks[2:(NBIN + 1)])/2
    obj <- as.list(1:NBIN)
    names(obj) <- format(1:NBIN)
    for (k in 1:NBIN) {
        obj[[k]] <- describe.bplot(y[x < breaks[k + 1] & x > 
            breaks[k]], style = style, outlier = outlier)
    }
    if (plot) {
        bplot.obj(obj, pos = centers, label.cex = 0, outlier = outlier, 
            , xaxt = xaxt, ...)
    }
    else {
        return(list(centers = centers, breaks = breaks, bplot.obj = obj))
    }
    invisible()
}
back to top