Skip to content

Commit 4248379

Browse files
committed
note updates 2
1 parent 7d3a321 commit 4248379

18 files changed

Lines changed: 50 additions & 50 deletions

R/abort_if_not.r

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#' Ensure the truth of R expressions
22
#'
3-
#' If any of the expressions in `...` are not all `TRUE`, [rlang::abort] is
3+
#' If any of the expressions in `...` are not all `TRUE`, [abort][rlang::abort] is
44
#' called for the first expression which was not ([all]) `TRUE`. The names
55
#' of expressions can be used as the error message or a single default error
66
#' message can be given using `.message`. Both are passed to
7-
#' [cli::format_inline] for formatting.
7+
#' [format_inline][cli::format_inline] for formatting.
88
#'
99
#' @param ... any number of R expressions, which should each evaluate to
1010
#' (a logical vector of [all]) `TRUE` for no error to occur. Positive numbers
@@ -13,7 +13,7 @@
1313
#' will be used in the error message.
1414
#' @param .message single default error message for non-named expressions.
1515
#' @param .error_call the call environment to use for error messages
16-
#' (passed to [rlang::abort]).
16+
#' (passed to [abort][rlang::abort]).
1717
#' @return NULL, called for side effects only.
1818
#' @details [favr::abort_if] is the opposite of [favr::abort_if_not],
1919
#' i.e. expressions should evaluate to ([all]) `FALSE` for no error to

R/are_attr.r

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
#'
33
#' @description
44
#'
5-
#' Wrappers around [rlang] predicates that allow multiple
5+
#' Wrappers around [rlang][rlang::rlang-package] predicates that allow multiple
66
#' objects to be passed. The following documentation is adapted
7-
#' from the [rlang] documentation:
7+
#' from the rlang [documentation][rlang::is_named]:
88
#'
99
#' * `are_named()` is a scalar predicate that checks that objects in `...`
1010
#' have a `names` attribute and that none of the names are missing or empty
@@ -13,7 +13,7 @@
1313
#' * `are_named2()` is like `are_named()` but always returns `TRUE` for
1414
#' empty vectors, even those that don't have a `names` attribute.
1515
#' In other words, it tests for the property that each element of a
16-
#' vector is named. `are_named2()` composes well with [names2()]
16+
#' vector is named. `are_named2()` composes well with `names2()`
1717
#' whereas `are_named()` composes with `names()`.
1818
#'
1919
#' * `have_names()` is a vectorised variant.

R/are_types.r

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
#'
33
#' @description
44
#'
5-
#' Wrappers around [rlang][rlang-package] type predicates that allow multiple
6-
#' objects to be passed. The following documentation is adapted
5+
#' Wrappers around [rlang][rlang::rlang-package] type predicates that
6+
#' allow multiple objects to be passed. The following documentation is adapted
77
#' from the rlang [documentation][rlang::type-predicates]:
88
#'
99
#' These type predicates aim to make type testing in R more
@@ -151,8 +151,8 @@ are_null <- function(..., .all = FALSE) {
151151
#'
152152
#' @description
153153
#'
154-
#' Wrappers around [rlang][rlang-package] scalar type predicates that allow
155-
#' multiple objects to be passed. The following documentation is adapted
154+
#' Wrappers around [rlang][rlang::rlang-package] scalar type predicates that
155+
#' allow multiple objects to be passed. The following documentation is adapted
156156
#' from the rlang [documentation][rlang::scalar-type-predicates]:
157157
#'
158158
#' These predicates check for a given type and whether the vector is
@@ -286,8 +286,8 @@ are_scalar_bytes <- function(..., .all = FALSE) {
286286
#'
287287
#' @description
288288
#'
289-
#' Wrappers around [rlang][rlang-package] type predicates that allow multiple
290-
#' objects to be passed. The following documentation is adapted
289+
#' Wrappers around [rlang][rlang::rlang-package] type predicates that
290+
#' allow multiple objects to be passed. The following documentation is adapted
291291
#' from the rlang [documentation][rlang::bare-type-predicates]:
292292
#'
293293
#' These predicates check for a given type but only return `TRUE` for
@@ -421,7 +421,7 @@ are_bare_numeric <- function(..., .n = NULL, .all = FALSE) {
421421
#' @param ... Objects to be tested.
422422
#' @param .all Whether to return if all arguments are TRUE.
423423
#' @inherit are-type-predicates return
424-
#' @seealso [is_empty]
424+
#' @seealso [is_empty][rlang::is_empty]
425425
#' @examples
426426
#' x <- 1
427427
#' y <- NULL
@@ -475,7 +475,7 @@ are_false <- function(..., .all = FALSE) {
475475
#'
476476
#' @description
477477
#'
478-
#' Wrappers around [rlang][rlang-package] type predicates that allow
478+
#' Wrappers around [rlang][rlang::rlang-package] type predicates that allow
479479
#' multiple objects to be passed. The following documentation is adapted
480480
#' from the rlang [documentation][rlang::is_integerish]:
481481
#'

R/cast_if_not.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#' @param .env the environment to use for the evaluation of the casting
1515
#' expressions and the assignment of the casted objects.
1616
#' @param .error_call the call environment to use for error messages
17-
#' (passed to [rlang::abort]).
17+
#' (passed to [abort][rlang::abort]).
1818
#' @return NULL, but objects named in `...` will be changed in the
1919
#' `.env` environment specified.
2020
#' @details See [favr::abort_if_not] for general validation,

R/enforce.r

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#' Ensure the truth of R expressions and cast/recycle objects.
22
#'
3-
#' If any of the expressions in `...` are not all `TRUE`, [rlang::abort]
3+
#' If any of the expressions in `...` are not all `TRUE`, [abort][rlang::abort]
44
#' is called for the first which was not ([all]) `TRUE`. Alternatively,
5-
#' [rlang::formulas](https://rlang.r-lib.org/reference/new_formula.html) can
5+
#' [rlang formulas](https://rlang.r-lib.org/reference/new_formula.html) can
66
#' be used to pass multiple objects to validation formulas/functions,
77
#' and/or attempt safe type casting and size recycling using the
88
#' [favr::cast], [favr::recycle] and [favr::coerce] functions. The rhs of
@@ -19,11 +19,11 @@
1919
#' [favr::coerce] on the rhs. The rhs of a formula can also be a [list]
2020
#' of multiple functions/formulas/calls. If an expression is named, or
2121
#' if the list element on the rhs of a formula is named, the name is passed to
22-
#' [cli::format_inline] and is used in the error message.
22+
#' [format_inline][cli::format_inline] and is used in the error message.
2323
#' @param .env the environment to use for the evaluation of the
2424
#' expressions and the assignment of the objects.
2525
#' @param .error_call the call environment to use for error messages
26-
#' (passed to [rlang::abort]).
26+
#' (passed to [abort][rlang::abort]).
2727
#' @return NULL, but objects casted/recycled in `...` will be changed in
2828
#' the `.env` environment specified.
2929
#' @details See [favr::abort_if_not] for only validations and

R/recycle_if_not.r

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#' @param .env the environment to use for the evaluation of the recycling
1414
#' expressions and the assignment of the recycled objects.
1515
#' @param .error_call the call environment to use for error messages
16-
#' (passed to [rlang::abort]).
16+
#' (passed to [abort][rlang::abort]).
1717
#' @return NULL, but objects named in `...` will be changed in the
1818
#' `.env` environment specified.
1919
#' @details See [favr::abort_if_not] for general validation,

R/schema.r

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
#' elements.
33
#'
44
#' If any of the expressions in `...`, evaluated within the data mask
5-
#' `data` (see [rlang::args_data_masking]), are not all `TRUE`, [rlang::abort]
5+
#' `'data'` (see [data masking][rlang::args_data_masking]), are not all `TRUE`, [abort][rlang::abort]
66
#' is called for the first which was not ([all]) `TRUE`. Alternatively,
7-
#' [rlang::formulas](https://rlang.r-lib.org/reference/new_formula.html) can
7+
#' [rlang formulas](https://rlang.r-lib.org/reference/new_formula.html) can
88
#' be used to take advantage of [tidyselect](https://tidyselect.r-lib.org/index.html)
99
#' features and pass multiple named elements in `data` to validation
1010
#' formulas/functions, and/or attempt safe type casting and size recycling
@@ -18,19 +18,19 @@
1818
#'
1919
#' @param data a data.frame or list to use as the data mask.
2020
#' @param ... any number of R expressions or formulas to be evaluated using
21-
#' `data` as a data mask. Formulas can use [tidyselect] syntax
21+
#' `data` as a data mask. Formulas can use tidyselect syntax
2222
#' on the lhs and either functions or formulas that evaluate to logical, or one
2323
#' of the type/size functions: [favr::cast], [favr::recycle] and [favr::coerce]
2424
#' on the rhs. The rhs of a formula can also be a [list] of multiple
2525
#' functions/formulas/calls. If an expression is named, or if the list
2626
#' element on the rhs of a formula is named, the name is passed to
27-
#' [cli::format_inline] and is used in the error message.
27+
#' [format_inline][cli::format_inline] and is used in the error message.
2828
#' @param .names character vector of names which must be present in the `data`
2929
#' data.frame/list.
3030
#' @param .size positive scalar integerish value for the size that the `data`
3131
#' data.frame/list must be.
3232
#' @param .error_call the call environment to use for error messages
33-
#' (passed to [rlang::abort]).
33+
#' (passed to [abort][rlang::abort]).
3434
#' @param .darg the argument name of `data` to use in error messages.
3535
#' @return `data` is returned with attached class `with_schema` and
3636
#' attribute `schema` containing the schema call to be enforced later.

man/abort_if_not.Rd

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/are-bare-type-predicates.Rd

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/are-scalar-type-predicates.Rd

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)