https://github.com/cran/fields
Raw File
Tip revision: 8eab500c3dad2103092ff68706417414fe53e16b authored by Doug Nychka on 22 September 2009, 20:23:49 UTC
version 6.01
Tip revision: 8eab500
surface.mKrig.R
# fields, Tools for spatial data
# Copyright 2004-2007, Institute for Mathematics Applied Geosciences
# University Corporation for Atmospheric Research
# Licensed under the GPL -- www.gpl.org/licenses/gpl.html
"surface.mKrig" <- function(obj, grid.list = NA, extrap = FALSE, 
    graphics.reset = NULL, xlab = NULL, ylab = NULL, main = NULL, 
    zlab = NULL, zlim = NULL, levels = NULL, type = "C", nx = 80, 
    ny = 80, ...) {
    ## modified so that you can give main, and ylab as arguments
    ## in ... and have them passed correctly
    out.p <- predict.surface(obj, grid.list = grid.list, extrap = extrap, 
        nx = nx, ny = ny)
    if (!is.null(ylab)) 
        out.p$ylab <- ylab
    if (!is.null(xlab)) 
        out.p$xlab <- xlab
    if (!is.null(zlab)) 
        out.p$zlab <- zlab
    if (!is.null(main)) 
        out.p$main <- main
    ##    else
    ##      out.p$main <- NULL
    plot.surface(out.p, type = type, graphics.reset = graphics.reset, 
        levels = levels, zlim = zlim, ...)
    invisible()
}
back to top