Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
nrennie committed Dec 26, 2022
1 parent cfcd745 commit 97047d7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions .lintr
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ linters: linters_with_defaults(
line_length_linter=line_length_linter(160),
T_and_F_symbol_linter(),
assignment_linter(),
object_usage_linter = NULL,
object_name_linter("snake_case")
)
5 changes: 3 additions & 2 deletions R/divide.R
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ divide <- function(num_lines = 30,
col_palette = PrettyCols::prettycols("Beach"),
s = 1234) {
set.seed(s)
polygon1 <- sf::st_polygon(list(cbind(c(0,1,1,0,0), c(0,0,1,1,0))))
polygon1 <- sf::st_polygon(list(cbind(c(0, 1, 1, 0, 0), c(0, 0, 1, 1, 0))))
endpoints <- tibble::tibble(x = c(seq(0, 1, length = 100),
seq(0, 1, length = 100),
rep(0, 100),
Expand All @@ -26,7 +26,8 @@ divide <- function(num_lines = 30,
cropped_sf <- lwgeom::st_split(polygon1, make_lines) %>%
sf::st_collection_extract(c("POLYGON")) %>%
sf::st_as_sf() %>%
dplyr::mutate(col = sample(1:length(col_palette), size = nrow(.), replace = TRUE))
dplyr::mutate(col = sample(seq_len(length(col_palette)),
size = nrow(.), replace = TRUE))
g <- ggplot2::ggplot() +
ggplot2::geom_sf(data = cropped_sf,
mapping = ggplot2::aes(fill = col),
Expand Down
2 changes: 1 addition & 1 deletion R/globalVariables.R
Original file line number Diff line number Diff line change
@@ -1 +1 @@
globalVariables(c("..density.."))
globalVariables(c("..density..", "."))

0 comments on commit 97047d7

Please sign in to comment.