-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
495958a
commit c94830d
Showing
6 changed files
with
21 additions
and
23 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,30 @@ | ||
#' @title Select all authors or exclude some from a selection | ||
#' @description Selection helpers to use in conjonction with `set_*()` methods: | ||
#' @description Selection helpers to use in conjonction with status setter | ||
#' methods (i.e. methods that assign a status to authors with either `TRUE` | ||
#' or `FALSE`): | ||
#' * [`everyone()`] select all authors. | ||
#' * [`everyone_but()`] select all but specific authors. | ||
#' * [`everyone_but()`] `r lifecycle::badge("deprecated")` this function was | ||
#' deprecated as I believe it is not necessary since not more than a couple of | ||
#' authors should normally be given a particular status. | ||
#' @examples | ||
#' aut <- Plume$new(encyclopedists) | ||
#' | ||
#' aut$set_corresponding_authors(everyone()) | ||
#' aut$get_plume() |> dplyr::select(1:3, corresponding) | ||
#' | ||
#' aut$set_corresponding_authors( | ||
#' everyone_but(jean), | ||
#' .by = "given_name" | ||
#' ) | ||
#' aut$get_plume() |> dplyr::select(1:3, corresponding) | ||
#' @export | ||
everyone <- function() { | ||
binder$pull() | ||
} | ||
|
||
#' @rdname everyone | ||
#' @keywords internal | ||
#' @param ... One or more unquoted expressions separated by commas. Expressions | ||
#' matching values in the column defined by the `by` parameter of `set_*()` | ||
#' methods are used to set a given status to authors. Matching of values is | ||
#' case-insensitive. | ||
#' @export | ||
everyone_but <- function(...) { | ||
lifecycle::deprecate_warn("0.2.0", "everyone_but()") | ||
out <- binder$pull() | ||
discard(out, enexprs(...)) | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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