Skip to content

Commit

Permalink
Merge branch 'toledo60-remove-purrr'
Browse files Browse the repository at this point in the history
  • Loading branch information
nrennie committed Jun 16, 2024
2 parents 1b23621 + 7e3852f commit e89b7a9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
5 changes: 2 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: PrettyCols
Title: Pretty Colour Palettes
Version: 1.0.1.9002
Version: 1.0.1.9003
Authors@R:
person(given = "Nicola",
family = "Rennie",
Expand All @@ -17,8 +17,7 @@ Imports:
ggplot2,
graphics,
grDevices,
lifecycle,
purrr
lifecycle
Suggests:
covr,
knitr,
Expand Down
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
* Changes examples to `mtcars` data
* Remove `scale_name` from `discrete_scale()` calls
* Add {lifecycle} to Imports

* Removed {purrr} dependency

## PrettyCols 1.0.1 2023_01_27

Expand Down
4 changes: 2 additions & 2 deletions R/view_all_palettes.R
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ view_all_palettes <- function(type = "all",
n_col <- min(4, floor(sqrt(n_all)))
n_row <- ceiling(n_all / n_col)
par(mfrow = c(n_row, n_col))
purrr::map(.x = names(to_print), .f = ~ print(prettycols(.x)))
lapply(names(to_print), function(.x) print(prettycols(.x)))
par(mfrow = c(1, 1))
} else {
if (colourblind_friendly == TRUE) {
Expand All @@ -46,7 +46,7 @@ view_all_palettes <- function(type = "all",
n_col <- min(3, floor(sqrt(n_all)))
n_row <- ceiling(n_all / n_col)
par(mfrow = c(n_row, n_col))
purrr::map(.x = names(filtered_palettes), .f = ~ print(prettycols(.x)))
lapply(names(filtered_palettes), function(.x) print(prettycols(.x)))
par(mfrow = c(1, 1))
}
}
Expand Down

0 comments on commit e89b7a9

Please sign in to comment.