Browse files

Minor change

  • Loading branch information...
1 parent 12a1ebf commit 74b305de7b21c70a89f4441dcab30ae194107314 Jason Fisher committed May 18, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 man/Grid2Polygons.Rd
View
6 man/Grid2Polygons.Rd
@@ -56,19 +56,19 @@ z1 <- c(1.1, 1.5, 4.2, 4.1, 4.3, 4.7,
xc <- c(rep(seq(0.5, 5.5, by = 1), m))
yc <- as.vector(sapply(rev(seq(0.5, 4.5, by = 1)), function(i) rep(i, n)))
grd <- data.frame(z1 = z1, xc = xc, yc = yc)
-coordinates(grd) <- ~xc + yc
+coordinates(grd) <- ~ xc + yc
gridded(grd) <- TRUE
grd <- as(grd, "SpatialGridDataFrame")
proj4string(grd) <- CRS("+proj=longlat +datum=WGS84")
summary(grd)
-spplot(grd, sp.layout=list(list("sp.lines", gridlines(grd), lty = 1, first = FALSE)))
+spplot(grd, sp.layout = list(list("sp.lines", gridlines(grd), lty = 1, first = FALSE)))
plys <- Grid2Polygons(grd, at = 1:5)
summary(plys)
spplot(plys)
# Example 2:
data(meuse.grid)
-coordinates(meuse.grid) <- ~x + y
+coordinates(meuse.grid) <- ~ x + y
gridded(meuse.grid) <- TRUE
meuse.grid <- as(meuse.grid, "SpatialGridDataFrame")
meuse.plys <- Grid2Polygons(meuse.grid, "soil")

0 comments on commit 74b305d

Please sign in to comment.