Skip to content

Commit

Permalink
tidy
Browse files Browse the repository at this point in the history
  • Loading branch information
edzer committed Dec 10, 2023
1 parent 683a548 commit cde0757
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions R/arith.R
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#' a = st_buffer(st_point(c(0,0)), 2)
#' b = a + c(2, 0)
#' p = function(m) { plot(c(a,b)); plot(eval(parse(text=m)), col=grey(.9), add = TRUE); title(m) }
#' lapply(c('a | b', 'a / b', 'a & b', 'a %/% b'), p)
#' o = lapply(c('a | b', 'a / b', 'a & b', 'a %/% b'), p)
#' par(opar)
#' sfc = st_sfc(st_point(0:1), st_point(2:3))
#' sfc + c(2,3) # added to EACH geometry
Expand All @@ -47,7 +47,7 @@ Ops.sfg <- function(e1, e2) {
switch (.Generic,
"-" = return(e1 * -1.0),
"+" = return(e1),
stop(paste("unary", .Generic, "not defined for \"sfg\" objects"))
stop(paste("unary", .Generic, 'not defined for "sfg" objects'))
)
}

Expand Down
2 changes: 1 addition & 1 deletion man/Ops.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion tests/dplyr.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ if (require(dplyr, quietly = TRUE)) {
options(dplyr.summarise.inform=FALSE)
read_sf(system.file("shape/nc.shp", package="sf"), quiet = TRUE) %>%
st_transform(3857) -> nc
nc = st_as_sf(nc, sf_column_name = "geometry")
nc %>% filter(AREA > .1) %>% plot()

# plot 10 smallest counties in grey:
Expand Down

0 comments on commit cde0757

Please sign in to comment.