Skip to content

Commit a013492

Browse files
committed
Use explicit namespace for functions from suggested packages
1 parent d95ed55 commit a013492

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

R/coord-map.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ coord_transform.map <- function(coord, data, details) {
8888
out
8989
}
9090
mproject <- function(coord, x, y, orientation) {
91-
suppressWarnings(mapproject(x, y,
91+
suppressWarnings(mapproj::mapproject(x, y,
9292
projection = coord$projection,
9393
parameters = coord$params,
9494
orientation = orientation

R/fortify-spatial.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ fortify.SpatialPolygonsDataFrame <- function(model, data, region = NULL, ...) {
3131
try_require("maptools")
3232

3333
# Union together all polygons that make up a region
34-
unioned <- unionSpatialPolygons(cp, attr[, region])
34+
unioned <- maptools::unionSpatialPolygons(cp, attr[, region])
3535
coords <- fortify(unioned)
3636
coords$order <- 1:nrow(coords)
3737
}

R/geom-hex.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ hexGrob <- function(x, y, size = rep(1, length(x)), colour = "grey50", fill = "g
4444
dx <- resolution(x, FALSE)
4545
dy <- resolution(y, FALSE) / sqrt(3) / 2 * 1.15
4646

47-
hexC <- hexcoords(dx, dy, n = 1)
47+
hexC <- hexbin::hexcoords(dx, dy, n = 1)
4848

4949
n <- length(x)
5050

R/stat-binhex.r

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,14 @@ hexBin <- function(x, y, binwidth) {
8585
ybins <- diff(ybnds) / binwidth[2]
8686

8787
# Call hexbin
88-
hb <- hexbin(
88+
hb <- hexbin::hexbin(
8989
x, xbnds = xbnds, xbins = xbins,
9090
y, ybnds = ybnds, shape = ybins / xbins,
9191
)
9292

9393
# Convert to data frame
9494
data.frame(
95-
hcell2xy(hb),
95+
hexbin::hcell2xy(hb),
9696
count = hb@count,
9797
density = hb@count / sum(hb@count, na.rm=TRUE)
9898
)

0 commit comments

Comments
 (0)