swh:1:snp:8c443ee102a7f3a9fe0e834b4caec2f704d4d442
Raw File
Tip revision: 919f138ae97c73da2321579cf0a01351bf9ebff3 authored by Martin Schlather on 11 October 2016, 18:32:27 UTC
version 3.1.24.1
Tip revision: 919f138
auxiliary.R



.RandomFields.env <- new.env()



vectordist <- function(x, diag=FALSE) {
  storage.mode(x) <- "double"
  res <- .Call("vectordist", t(x), diag)
  dimnames(res) <- list(dimnames(x)[[2]], NULL)
  return(t(res));
}



my.legend <- function(lu.x, lu.y, zlim, col, cex=1, ...) {
  ## uses already the legend code of R-1.3.0
  cn <- length(col)
  if (cn < 43) {
    col <- rep(col, each=ceiling(43 / cn))
    cn <- length(col)
  }
  filler <- vector("character", length=(cn-3)/2)
  legend(lu.x, lu.y, y.intersp=0.03, x.intersp=0.1, 
         legend=c(format(zlim[2], dig=2), filler,
             format(mean(zlim), dig=2), filler,
             format(zlim[1], dig=2)),
         lty=1, col=rev(col),cex=cex, ...)
}
back to top