-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #187 from birdflow-science/186-add-plot-transforma…
…tion-options 186 add plot transformation options
- Loading branch information
Showing
18 changed files
with
215 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#' Suppress warnings that match one or more regular expressions | ||
#' | ||
#' `suppress_specific_warnings()` will suppress warnings that match regular | ||
#' expression patterns that are supplied via | ||
#' the `patterns` argument, without suppressing warnings that don't match the | ||
#' patterns. | ||
#' | ||
#' @keywords internal | ||
#' @param x An expression. | ||
#' @param patterns One or more patterns to check warning messages against. | ||
#' | ||
#' @return Possibly output from `x` | ||
#' @keywords internal | ||
suppress_specific_warnings <- function(x, patterns = NULL) { | ||
|
||
|
||
|
||
any_match <- function(cnd, patterns) { | ||
any(sapply(patterns, function(x) grepl(x, cnd))) | ||
} | ||
|
||
check_warning <- function(w) { | ||
if (any_match(conditionMessage(w), patterns)) | ||
invokeRestart("muffleWarning") | ||
} | ||
|
||
withCallingHandlers(x, warning = check_warning) | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.