diff --git a/man/lm.RStests.Rd b/man/lm.RStests.Rd index f93eec11..fc610f76 100644 --- a/man/lm.RStests.Rd +++ b/man/lm.RStests.Rd @@ -88,7 +88,7 @@ lw <- nb2listw(COL.nb) res <- lm.RStests(oldcrime.lm, listw=lw, test="all") summary(res) if (require("spatialreg", quietly=TRUE)) { - oldcrime.slx <- lm(CRIME ~ HOVAL + INC, data = COL.OLD, listw=lw) + oldcrime.slx <- lmSLX(CRIME ~ HOVAL + INC, data = COL.OLD, listw=lw) summary(lm.RStests(oldcrime.slx, listw=lw, test=c("adjRSerr", "adjRSlag"))) } } diff --git a/man/localmoran.exact.Rd b/man/localmoran.exact.Rd index ecc2fc6f..ff69e259 100644 --- a/man/localmoran.exact.Rd +++ b/man/localmoran.exact.Rd @@ -74,7 +74,6 @@ When the alternative is being tested, a list of left and right M products in att \examples{ eire <- st_read(system.file("shapes/eire.gpkg", package="spData")[1]) row.names(eire) <- as.character(eire$names) -st_crs(eire) <- "+proj=utm +zone=30 +ellps=airy +units=km" eire.nb <- poly2nb(eire) e.lm <- lm(OWNCONS ~ ROADACC, data=eire) localmoran.sad(e.lm, nb=eire.nb) diff --git a/man/localmoran.sad.Rd b/man/localmoran.sad.Rd index d74b486b..80f548bd 100644 --- a/man/localmoran.sad.Rd +++ b/man/localmoran.sad.Rd @@ -107,7 +107,6 @@ Geographical Analysis, 34, pp. 187--206.} \examples{ eire <- st_read(system.file("shapes/eire.gpkg", package="spData")[1]) row.names(eire) <- as.character(eire$names) -st_crs(eire) <- "+proj=utm +zone=30 +ellps=airy +units=km" eire.nb <- poly2nb(eire) lw <- nb2listw(eire.nb) e.lm <- lm(OWNCONS ~ ROADACC, data=eire) diff --git a/man/mstree.Rd b/man/mstree.Rd index c1b57504..31724305 100644 --- a/man/mstree.Rd +++ b/man/mstree.Rd @@ -47,7 +47,6 @@ mstree(nbw, ini = NULL) ### loading data bh <- st_read(system.file("etc/shapes/bhicv.gpkg", package="spdep")[1], quiet=TRUE) -st_crs(bh) <- "OGC:CRS84" ### data padronized dpad <- data.frame(scale(as.data.frame(bh)[,5:8])) diff --git a/man/nblag.Rd b/man/nblag.Rd index 215f5c41..acc3ecbf 100644 --- a/man/nblag.Rd +++ b/man/nblag.Rd @@ -40,14 +40,14 @@ run <- FALSE if (require(igraph, quietly=TRUE) && require(spatialreg, quietly=TRUE)) run <- TRUE if (run) { W <- as(nb2listw(col.gal.nb), "CsparseMatrix") -G <- graph.adjacency(W, mode="directed", weight="W") +G <- graph_from_adjacency_matrix(W, mode="directed", weight="W") D <- diameter(G) nbs <- nblag(col.gal.nb, maxlag=D) n <- length(col.gal.nb) lmat <- lapply(nbs, nb2mat, style="B", zero.policy=TRUE) mat <- matrix(0, n, n) for (i in seq(along=lmat)) mat = mat + i*lmat[[i]] -G2 <- shortest.paths(G) +G2 <- distances(G) print(all.equal(G2, mat, check.attributes=FALSE)) } } diff --git a/man/skater.Rd b/man/skater.Rd index 3d8eb2d7..1db38d3c 100644 --- a/man/skater.Rd +++ b/man/skater.Rd @@ -74,7 +74,6 @@ skater(edges, data, ncuts, crit, vec.crit, method = c("euclidean", ### loading data bh <- st_read(system.file("etc/shapes/bhicv.gpkg", package="spdep")[1], quiet=TRUE) -st_crs(bh) <- "OGC:CRS84" ### data standardized dpad <- data.frame(scale(as.data.frame(bh)[,5:8]))