Skip to content

Commit

Permalink
fix example
Browse files Browse the repository at this point in the history
  • Loading branch information
IndrajeetPatil committed Sep 24, 2023
1 parent f4de51e commit 3aa18d2
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
#' colors allowed by `"Dark2"` palette from the `{RColorBrewer}` package.
#'
#' @examples
#' .is_palette_sufficient("RColorBrewer", "Dark2", 6L)
#' .is_palette_sufficient("RColorBrewer", "Dark2", 12L)
#' ggstatsplot:::.is_palette_sufficient("RColorBrewer", "Dark2", 6L)
#' ggstatsplot:::.is_palette_sufficient("RColorBrewer", "Dark2", 12L)
#'
#' @autoglobal
#' @keywords internal
Expand Down
4 changes: 2 additions & 2 deletions man/dot-is_palette_sufficient.Rd

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

4 changes: 2 additions & 2 deletions tests/testthat/_snaps/utils.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# .grouped_list works with non-syntactic group names

Code
sleep %>% rename(`my non-syntactic name` = group) %>% ggstatsplot:::.grouped_list(
sleep %>% rename(`my non-syntactic name` = group) %>% .grouped_list(
grouping.var = `my non-syntactic name`) %>% str()
Output
List of 2
Expand All @@ -19,7 +19,7 @@
# .is_palette_sufficient is working

Code
ggstatsplot:::.is_palette_sufficient("RColorBrewer", "Dark2", 20L)
.is_palette_sufficient("RColorBrewer", "Dark2", 20L)
Message <rlang_message>
Number of labels is greater than default palette color count.
* Select another color `palette` (and/or `package`).
Expand Down
6 changes: 3 additions & 3 deletions tests/testthat/test-utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ test_that(
expect_snapshot({
sleep %>%
rename("my non-syntactic name" = group) %>%
ggstatsplot:::.grouped_list(grouping.var = `my non-syntactic name`) %>%
.grouped_list(grouping.var = `my non-syntactic name`) %>%
str()
})
}
Expand All @@ -18,8 +18,8 @@ test_that(
test_that(
desc = ".is_palette_sufficient is working",
code = {
expect_no_condition(ggstatsplot:::.is_palette_sufficient("RColorBrewer", "Dark2", 2L))
expect_snapshot(ggstatsplot:::.is_palette_sufficient("RColorBrewer", "Dark2", 20L))
expect_no_condition(.is_palette_sufficient("RColorBrewer", "Dark2", 2L))
expect_snapshot(.is_palette_sufficient("RColorBrewer", "Dark2", 20L))
}
)

Expand Down

0 comments on commit 3aa18d2

Please sign in to comment.