[r-cran-maps] 21/64: Import Upstream version 2.0-39

Andreas Tille tille at debian.org
Thu Sep 7 07:32:31 UTC 2017


This is an automated email from the git hooks/post-receive script.

tille pushed a commit to branch master
in repository r-cran-maps.

commit c1d9388ffff05b41681d8c04e66557b8b439d926
Author: Andreas Tille <tille at debian.org>
Date:   Thu Sep 7 09:26:09 2017 +0200

    Import Upstream version 2.0-39
---
 DESCRIPTION         |  29 +++++------
 R/misc.r            |  11 +++--
 R/oldmap.r          | 136 ----------------------------------------------------
 R/polygon.r         |   8 ++--
 R/smooth.r          |  11 ++---
 man/internal2.Rd    |   6 ---
 man/polygon.Rd      |   2 -
 man/world.cities.Rd |   1 +
 src/Makefile        |   2 -
 9 files changed, 31 insertions(+), 175 deletions(-)

diff --git a/DESCRIPTION b/DESCRIPTION
index 2dd9910..9afc3ad 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,14 +1,15 @@
-Package: maps
-Title: Draw Geographical Maps
-Version: 2.0-38
-Date: 2007-09-12
-Author: Original S code by Richard A. Becker and Allan R. Wilks.
-	R version by Ray Brownrigg <Ray.Brownrigg at mcs.vuw.ac.nz>
-        Enhancements by Thomas P Minka <surname at stat.cmu.edu>
-Description: Display of maps.  Projection code and larger maps are in
-             separate packages (mapproj and mapdata).
-Depends: R (>= 1.7.0)
-Suggests: mapproj
-License: GPL2
-Maintainer: Ray Brownrigg <Ray.Brownrigg at mcs.vuw.ac.nz>
-Packaged: Wed Sep 12 14:18:10 2007; ray
+Package: maps
+Title: Draw Geographical Maps
+Version: 2.0-39
+Date: 2007-10-14
+Author: Original S code by Richard A. Becker and Allan R. Wilks.
+	R version by Ray Brownrigg <Ray.Brownrigg at mcs.vuw.ac.nz>
+        Enhancements by Thomas P Minka <surname at stat.cmu.edu>
+Description: Display of maps.  Projection code and larger maps are in
+             separate packages (mapproj and mapdata).
+Depends: R (>= 2.0.0)
+LazyLoad: yes
+Suggests: mapproj
+License: GPL2
+Maintainer: Ray Brownrigg <Ray.Brownrigg at mcs.vuw.ac.nz>
+Packaged: Sun Oct 14 11:00:16 2007; root
diff --git a/R/misc.r b/R/misc.r
index 1054471..0a1b17e 100644
--- a/R/misc.r
+++ b/R/misc.r
@@ -30,8 +30,9 @@ function (x = world.cities, country = "", label = NULL, minpop = 0,
     maxpop = Inf, capitals = 0, cex = par("cex"), projection = FALSE,
     parameters = NULL, orientation = NULL, ...) 
 {
-    if (missing(x)) 
-        data(world.cities)	# uses lazy evaluation
+    if (missing(x)) {
+        data(world.cities, package = "maps")	# uses lazy evaluation
+    }
     usr <- par("usr")
     if (!missing(projection) && projection != FALSE) {
         if (is.character(projection)) {
@@ -98,9 +99,9 @@ function (x = world.cities, country = "", label = NULL, minpop = 0,
 function (x, y, relwidth = 0.15, metric = TRUE, ratio = TRUE, ...) 
 {
   # old version
-  format.pretty <- function(x) {
-    as.character(pretty(x * c(0.99, 1.01), n = 2)[2])
-  }
+  # format.pretty <- function(x) {
+  #   as.character(pretty(x * c(0.99, 1.01), n = 2)[2])
+  # }
   # minka: new version
   format.pretty <- function(x, digits = 2) {
     x = signif(x, 2)
diff --git a/R/oldmap.r b/R/oldmap.r
deleted file mode 100644
index 5230ee6..0000000
--- a/R/oldmap.r
+++ /dev/null
@@ -1,136 +0,0 @@
-"map.old" <-
-function (database = "state", regions = ".", exact = F, boundary = T, 
-    interior = T, fill = F, projection = "", parameters = NULL, 
-    orientation = rep(NA, 3), color = 1, add = F, plot = T, namesonly = F, 
-    xlim = c(-1e+30, 1e+30), ylim = c(-1e+30, 1e+30), resolution = 1, 
-    type = "l", ...) 
-{
-  "makepoly" <- function(xy, gonsize, keep) {
-    x <- xy$x
-    y <- xy$y
-    n <- length(x)
-    gonsize <- gonsize[ - length(gonsize)]
-    discard <- seq(x)[is.na(x)]
-    if(length(discard) > 0)
-      discard <- c(discard, discard - 1, n)
-    if(length(gonsize) > 0)
-      discard <- discard[ - cumsum(gonsize)]
-    if(length(discard) > 0) {
-      x <- x[ - discard]
-      y <- y[ - discard]
-    }
-    keep <- rep(keep, diff(c(0, seq(x)[is.na(x)], length(x))))
-    list(x = x[keep], y = y[keep])
-  }
-
-    if (!missing(resolution) && !plot) 
-        stop("must have plot=T if resolution is given")
-    if (!fill && !boundary && !interior) 
-        stop("one of boundary and interior must be TRUE")
-    doproj <- !missing(projection) || !missing(parameters) || 
-        !missing(orientation)
-    coordtype <- maptype(database)
-    if (coordtype == "unknown") 
-        stop("missing database or unknown coordinate type")
-    if (doproj && coordtype != "spherical") 
-        stop(paste(database, "database is not spherical; projections not allowed"))
-    gon <- mapname(database, regions, exact)
-    n <- length(gon)
-    if (n == 0) 
-        stop("nothing to draw: no recognized region names")
-    line <- mapgetg(database, gon, fill, xlim, ylim)
-    if (length(line$number) == 0) {
-        if (missing(xlim) || missing(ylim)) 
-            stop("nothing to draw: all regions out of bounds")
-        else coord <- list(x = c(xlim[1], NA, xlim[2]), y = c(ylim[1], 
-            NA, ylim[2]), range = c(xlim, ylim))
-        if (fill) 
-            stop("cannot fill: all data out of bounds")
-    }
-    else {
-        if (fill) 
-            coord <- mapgetl(database, line$number, xlim, ylim)
-        else {
-            l <- abs(line$number)
-            if (boundary && interior) 
-                l <- unique(l)
-            else if (boundary) 
-                l <- l[!match(l, l[duplicated(l)], F)]
-            else l <- l[duplicated(l)]
-            coord <- mapgetl(database, l, xlim, ylim)
-            if (length(coord) == 0) 
-                if (missing(xlim) || missing(ylim)) 
-                  stop("all data out of bounds")
-                else coord <- list(x = c(xlim[1], NA, xlim[2]), 
-                  y = c(ylim[1], NA, ylim[2]), range = c(xlim, 
-                    ylim))
-        }
-    }
-    if (doproj) {
-        coord <- mapproject(coord, pr = projection, pa = parameters, 
-            or = orientation)
-        if (plot && coord$error) 
-            if (all(is.na(coord$x))) 
-                stop("projection failed for all data")
-            else warning("projection failed for some data")
-    }
-    if (fill) {
-        gonsize <- line$size
-        color <- rep(color, length = length(gonsize))
-        keep <- !is.na(color)
-        coord[c("x", "y")] <- makepoly(coord, gonsize, keep)
-        color <- color[keep]
-    }
-    if (plot) {
-        if (!add) {
-	    # remove margins
-            par(pin = par("fin"))
-            plot.new()
-            #xrange <- coord$range[1:2]
-            #yrange <- coord$range[3:4]
-            xrange <- range(coord$x, na.rm = T)
-            yrange <- range(coord$y, na.rm = T)
-	    border <- c(0.01, 0.01)
-            if (!missing(xlim)) {
-                xrange[1] <- max(xrange[1], xlim[1])
-                xrange[2] <- min(xrange[2], xlim[2])
-		border[1] <- 0
-            }
-            if (!missing(ylim)) {
-                yrange[1] <- max(yrange[1], ylim[1])
-                yrange[2] <- min(yrange[2], ylim[2])
-		border[2] <- 0
-            }
-            aspect <- if (coordtype != "spherical" || doproj) 
-                c(1, 1)
-            else c(cos((mean(yrange) * pi)/180), 1)
-            d <- c(diff(xrange), diff(yrange)) * aspect
-            p <- par("pin")
-            # assumes coordinates are already clipped
-            p <- d*min(p/d)
-	    par(pin = p)
-            d <- d*border + ((p/min(p/d) - d)/2)/aspect
-            usr <- c(xrange, yrange) + rep(c(-1, 1), 2) * rep(d, c(2, 2))
-            par(usr = usr)
-        }
-        if (resolution != 0 && type != "n") {
-            pin <- par("pin")
-            usr <- par("usr")
-            resolution <- resolution * min(diff(usr)[-2]/pin/100)
-	    coord[c("x", "y")] <- mapthin(coord, resolution)
-        }
-        if (type != "n") {
-            #oerr <- par(err = -1)
-            #on.exit(par(oerr))
-            if (fill) 
-                polygon(coord, col = color, ...)
-            else lines(coord, col = color, type = type, ...)
-        }
-    }
-    value <- if (namesonly) 
-        line$name
-    else coord[c("x", "y", "range")]
-    if (plot) 
-        invisible(value)
-    else value
-}
diff --git a/R/polygon.r b/R/polygon.r
index 0df555a..69adbaa 100644
--- a/R/polygon.r
+++ b/R/polygon.r
@@ -115,10 +115,10 @@ num.polygons <- function(p) {
   else 1 + sum(is.na(p[, 1]))
 }
 
-range.polygon <- function(..., na.rm = FALSE) {
-  p <- as.list.polygon(...)
-  lapply(p[c("x", "y")], range, na.rm = na.rm)
-}
+# range.polygon <- function(..., na.rm = FALSE) {
+#   p <- as.list.polygon(...)
+#   lapply(p[c("x", "y")], range, na.rm = na.rm)
+# }
 
 map.text <- function(database, regions = ".", labels, cex = 0.75, add = FALSE,
                      move = FALSE, ...) {
diff --git a/R/smooth.r b/R/smooth.r
index d305d63..9b1aaeb 100644
--- a/R/smooth.r
+++ b/R/smooth.r
@@ -82,12 +82,11 @@ smooth.map <- function(m, z, res = 50, span = 1/10, averages = FALSE,
   if(FALSE) {
     # code for these is in 315/util.r
     # most time is spent here
-    w <- switch(type,
-                mass = gp.smoother(x, x, r, lambda),
-                smooth = kr.smoother(x, x, r, lambda))
-    #list(x = x, r = r, w = w)
-    z = drop(z %*% w)
-    cbind(x, z = z)
+    # w <- switch(type,
+    #             mass = gp.smoother(x, x, r, lambda),
+    #             smooth = kr.smoother(x, x, r, lambda))
+    # z = drop(z %*% w)
+    # cbind(x, z = z)
   } else {
     if(type == "smooth") {
       z = kernel.smooth(x, z, xo, lambda, r)
diff --git a/man/internal2.Rd b/man/internal2.Rd
index 520ddd6..dc92ddc 100644
--- a/man/internal2.Rd
+++ b/man/internal2.Rd
@@ -6,7 +6,6 @@
 \alias{insert}
 \alias{match.map.slow}
 \alias{match.map.grep}
-\alias{map.old}
 \alias{map.poly}
 \alias{map.wrap}
 \alias{subgroup}
@@ -23,11 +22,6 @@ indicators.factor(y)
 insert(x, i, v)
 match.map.slow(nam, regions, warn = FALSE)
 match.map.grep(nam, regions, warn = FALSE)
-map.old(database = "state", regions = ".", exact = F, boundary = T, 
-    interior = T, fill = F, projection = "", parameters = NULL, 
-    orientation = rep(NA, 3), color = 1, add = F, plot = T, namesonly = F, 
-    xlim = c(-1e+30, 1e+30), ylim = c(-1e+30, 1e+30), resolution = 1, 
-    type = "l", ...) 
 map.poly(database, regions = ".", exact = FALSE, xlim = NULL, ylim = NULL,
          boundary = TRUE, interior = TRUE, fill = FALSE, as.polygon = FALSE)
 map.wrap(p)
diff --git a/man/polygon.Rd b/man/polygon.Rd
index 1078b66..fdef7e7 100644
--- a/man/polygon.Rd
+++ b/man/polygon.Rd
@@ -6,7 +6,6 @@
 \alias{closed.polygon}
 \alias{in.polygon}
 \alias{in.one.polygon}
-\alias{range.polygon}
 \alias{num.polygons}
 \alias{sub.polygon}
 \title{Polygon functions}
@@ -18,7 +17,6 @@ closed.polygon(p)
 in.one.polygon(p, x)
 in.polygon(p, x)
 num.polygons(p)
-\method{range}{polygon}(..., na.rm = FALSE)
 sub.polygon(p, i)
 }
 \description{
diff --git a/man/world.cities.Rd b/man/world.cities.Rd
index 367630b..d5aadd9 100644
--- a/man/world.cities.Rd
+++ b/man/world.cities.Rd
@@ -10,6 +10,7 @@ This database is primarily of world cities of population greater than
 about 40,000.  Also included are capital cities of any population size, and
 many smaller towns.
 }
+\usage{data(world.cities)}
 \format{
 A list with 6 components, namely "name", "country.etc", "pop", "lat",
 "long", and "capital", containing the city name, the country name,
diff --git a/src/Makefile b/src/Makefile
index e778b39..02b5493 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -6,8 +6,6 @@ CP = cp
 ECHO = echo
 RM = rm
 
-CFLAGS = -g -Wall -pedantic -O6
-
 OBJS = mapget.o		\
 	smooth.o	\
 	thin.o

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/r-cran-maps.git



More information about the debian-science-commits mailing list