Skip to content

Commit

Permalink
new default for 'verbose'
Browse files Browse the repository at this point in the history
Now, the default for verbose is `getOption("verbose", default = FALSE)`

And we use messages instead of warnings

And the Rcpp code uses `Rcpp::message()` instead of `Rprintf()`
  • Loading branch information
slowkow committed Nov 4, 2024
1 parent 51c0ada commit e72a66d
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: ggrepel
Version: 0.9.6
Version: 0.9.6.9999
Authors@R: c(
person("Kamil", "Slowikowski", email = "[email protected]", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-2843-6370")),
person("Alicia", "Schep", role = "ctb", comment = c(ORCID = "0000-0002-3915-0618")),
Expand Down
8 changes: 8 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
ggrepel 0.9.6.9999
========================

- Set `verbose = getOption("verbose", default = FALSE)` by default, and use messages instead of warnings. Thanks to @jpquast for suggesting this change in [pull request 263]. This should prevent unexpected warning messages in packages that depend on ggrepel.

[pull request 263]: https://github.com/slowkow/ggrepel/pull/263


ggrepel 0.9.6
========================

Expand Down
14 changes: 14 additions & 0 deletions vignettes/examples.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,14 @@ p2 <- p + geom_text_repel() + labs(title = "geom_text_repel()")
gridExtra::grid.arrange(p1, p2, ncol = 2)
```

## Advanced examples

For more advanced ggrepel examples, check out [this article][ggpp-examples] by
Pedro Aphalo. In that article, Pedro shows how to use nudging functions from
the [ggpp] package to achieve greater control over label positions.

[ggpp-examples]: https://docs.r4photobiology.info/ggpp/articles/nudge-examples.html

## Installation

ggrepel is available on [CRAN]:
Expand Down Expand Up @@ -1034,6 +1042,11 @@ ggplot(dat, aes(wt, mpg, label = car)) +

### Verbose timing information

By default, ggrepel will respect the global `verbose` option, so please check `getOption("verbose")` to see if this is set to TRUE or FALSE in your environment.
We can set the global option with `options(verbose = TRUE)` or `options(verbose = FALSE)`.

We can override the global value by using `geom_text_repel(verbose = TRUE)` or `geom_text_repel(verbose = FALSE)`.

Use `verbose = TRUE` to see:

- how many iterations of the physical simulation
Expand All @@ -1055,6 +1068,7 @@ p + geom_text_repel(
)
```


### Word cloud

<div class="alert alert-info" role="alert">
Expand Down

0 comments on commit e72a66d

Please sign in to comment.