Skip to content

Commit

Permalink
spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
joethorley committed Nov 6, 2019
1 parent c6b3fd3 commit a234d5d
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

- `formals` argument to `chk_function()`.
- `tidy = TRUE` argument to errors, warnings and messages.
- `n = NULL` and `call. = FALSE` args to error message generating funcions.
- `n = NULL` and `call. = FALSE` args to error message generating functions.
- `ellipsis = 10L` argument to `cc()`.
- `sep = ", "` arg to `cc()`.
- `incomparables = FALSE` argument to `chk_unique()`.
Expand All @@ -47,7 +47,7 @@
## Minor Changes

- Changed `chk_match()` so ignores missing values.
- Changed `chk_true()` (and `chk_false()`) to same behaviour as `isTRUE` in R >= 3.5.
- Changed `chk_true()` (and `chk_false()`) to same behavior as `isTRUE` in R >= 3.5.
- Extended `chk_unique()` to handle `incomparables != FALSE` with data frames.
- Changed to `range = c(0,1)` for `chk_range()`.

Expand Down
2 changes: 1 addition & 1 deletion R/deprecated.R
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ vld_no_missing <- function(x) {
!anyNA(x)
}

#' @describeIn deparse_backtick_chk Deparse Back Tick
#' @describeIn deparse_backtick_chk Deparse Backtick
#'
#' \lifecycle{soft-deprecated}
#'
Expand Down
8 changes: 4 additions & 4 deletions R/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ abort_chk <- function(..., n = NULL, tidy = TRUE) {
err(..., n = n, tidy = tidy, .subclass = "chk_error")
}

#' Deparse Back Tick
#' Deparse Backtick
#'
#' `deparse_backtick_chk` is a wrapper on [deparse()]
#' and `backtick_chk`.
Expand All @@ -27,7 +27,7 @@ abort_chk <- function(..., n = NULL, tidy = TRUE) {
#'
#' @param x A substituted object to deparse.
#'
#' @return A string of the back ticked substituted object.
#' @return A string of the backticked substituted object.
#' @seealso [deparse()]
#' @export
#'
Expand All @@ -38,10 +38,10 @@ abort_chk <- function(..., n = NULL, tidy = TRUE) {
#' deparse_backtick_chk(2^2)
deparse_backtick_chk <- function(x) backtick_chk(deparse(x))

#' @describeIn deparse_backtick_chk Back Tick
#' @describeIn deparse_backtick_chk Backtick
#' @export
backtick_chk <- function(x) p0("`", x, "`")

#' @describeIn deparse_backtick_chk Unback Tick
#' @describeIn deparse_backtick_chk Unbacktick
#' @export
unbacktick_chk <- function(x) gsub("`", "", x)
10 changes: 5 additions & 5 deletions man/deparse_backtick_chk.Rd

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

2 changes: 1 addition & 1 deletion vignettes/chk-benchmarking.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ In summary, avoiding `chk_flag()` saves about `r signif(diff(times$median[c(4,3)
It is recommended to always use unconditional checking unless [profiling](http://adv-r.had.co.nz/Profiling.html) indicates the checks are a bottleneck.

If the bottleneck is due to repeated calls within the package the recommended option is to write an internal version of the function that has no checks.
Alternatively if the bottleneck is due to repeated calls by a user or other package then the recommended option is to add a chk argument that the user can explicity turn off.
Alternatively if the bottleneck is due to repeated calls by a user or other package then the recommended option is to add a chk argument that the user can explicitly turn off.

## `chk` Times

Expand Down

0 comments on commit a234d5d

Please sign in to comment.