Skip to content

Commit

Permalink
style: styler and lintr pass
Browse files Browse the repository at this point in the history
  • Loading branch information
rCarto committed Mar 25, 2024
1 parent c7e169b commit 19c9762
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
4 changes: 4 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ If you’ve found a bug, please file an issue that illustrates the bug with a mi

### Code style

* We use [styler](https://CRAN.R-project.org/package=styler) with current default values for code style.

* We use [lintr]( https://CRAN.R-project.org/package=lintr) with current default values for static code analysis.

* We use [roxygen2](https://cran.r-project.org/package=roxygen2) for documentation.

* We use [tinytest](https://cran.r-project.org/package=tinytest) for unit tests.
Expand Down
16 changes: 8 additions & 8 deletions R/mf_map.R
Original file line number Diff line number Diff line change
Expand Up @@ -317,9 +317,11 @@
#'
#' # type = "grad"
#' mf_map(mtq)
#' mf_map(mtq, var = "POP", type = "grad", pch = 22,
#' breaks = "quantile", nbreaks = 4, lwd = 2, border = "blue",
#' cex = c(.75,1.5,3,5), col = "lightgreen")
#' mf_map(
#' x = mtq, var = "POP", type = "grad",
#' pch = 22, breaks = "quantile", nbreaks = 4, lwd = 2, border = "blue",
#' cex = c(.75, 1.5, 3, 5), col = "lightgreen"
#' )
#'
#' # type = "prop_choro"
#' mf_map(mtq)
Expand All @@ -328,7 +330,7 @@
#' inches = .35, border = "tomato4",
#' val_max = 90000, symbol = "circle", col_na = "white", pal = "Cividis",
#' breaks = "equal", nbreaks = 4, lwd = 4,
#' leg_pos = "bottomleft",
#' leg_pos = "bottomleft",
#' leg_title = c("Population", "Median Income"),
#' leg_title_cex = c(0.8, 1),
#' leg_val_cex = c(.7, .9),
Expand Down Expand Up @@ -358,7 +360,7 @@
#' # type = "symb_choro"
#' mf_map(mtq)
#' mf_map(
#' mtq, c("STATUS", "MED"), type = "symb_choro",
#' x = mtq, c("STATUS", "MED"), type = "symb_choro",
#' pal = "Reds 3", breaks = "quantile", nbreaks = 4,
#' pch = 21:23, cex = c(3, 2, 1),
#' pch_na = 25, cex_na = 1.5, col_na = "blue",
Expand Down Expand Up @@ -447,8 +449,7 @@ mf_map <- function(x,

# add mgmgt, set default add, do not add if no device is launch
if (missing(add)) {
add <- switch(
type,
add <- switch(type,
prop = TRUE,
choro = FALSE,
typo = FALSE,
Expand Down Expand Up @@ -488,4 +489,3 @@ mf_map <- function(x,

return(invisible(x))
}

0 comments on commit 19c9762

Please sign in to comment.