diff --git a/DESCRIPTION b/DESCRIPTION index c5d24306f..42977e161 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -46,12 +46,12 @@ Suggests: Enhances: winch Encoding: UTF-8 -RoxygenNote: 7.3.3 Roxygen: list(markdown = TRUE) URL: https://rlang.r-lib.org, https://github.com/r-lib/rlang BugReports: https://github.com/r-lib/rlang/issues Config/build/compilation-database: true Config/testthat/edition: 3 +Config/roxygen2/version: 7.3.3.9000 Config/Needs/website: dplyr, tidyverse/tidytemplate diff --git a/NAMESPACE b/NAMESPACE index eb0efb0a9..3b67d3ff7 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,5 +1,6 @@ # Generated by roxygen2: do not edit by hand +S3method("$",r6lite) S3method("$",rlang_ctxt_pronoun) S3method("$",rlang_data_pronoun) S3method("$",rlang_fake_data_pronoun) @@ -64,6 +65,7 @@ S3method(names,rlang_fake_data_pronoun) S3method(print,"rlang:::list_of_conditions") S3method(print,quosure) S3method(print,quosures) +S3method(print,rlang_box) S3method(print,rlang_box_done) S3method(print,rlang_box_splice) S3method(print,rlang_data_pronoun) diff --git a/R/cnd-abort.R b/R/cnd-abort.R index 009fa4996..5508886da 100644 --- a/R/cnd-abort.R +++ b/R/cnd-abort.R @@ -1425,8 +1425,8 @@ call_restore <- function(x, to) { #' #' @name rlang_backtrace_on_error #' @seealso rlang_backtrace_on_warning -#' @aliases add_backtrace rlang_backtrace_on_error_report -#' rlang_backtrace_on_warning_report +#' @aliases add_backtrace rlang_backtrace_on_error_report +#' @aliases rlang_backtrace_on_warning_report #' #' @examples #' # Display a simplified backtrace on error for both base and rlang diff --git a/R/s3.R b/R/s3.R index 9a1074047..8bafa6c5f 100644 --- a/R/s3.R +++ b/R/s3.R @@ -118,7 +118,9 @@ unbox <- function(box) { } box[[1]] } -print.box <- function(x, ...) { + +#' @export +print.rlang_box <- function(x, ...) { cat_line("") print(unbox(x)) } diff --git a/R/trace.R b/R/trace.R index cc831da00..1f9b0bfb6 100644 --- a/R/trace.R +++ b/R/trace.R @@ -419,6 +419,7 @@ trace_bind <- function(...) { # Methods ----------------------------------------------------------------- # For internal use only +#' @exportS3Method NULL c.rlang_trace <- function(...) { traces <- list(...) diff --git a/R/utils.R b/R/utils.R index 49d46e284..ad742ce60 100644 --- a/R/utils.R +++ b/R/utils.R @@ -108,6 +108,7 @@ codes <- list( ) +#' @export `$.r6lite` <- function(self, arg) { field <- env_get(self, as_string(substitute(arg)), inherit = TRUE) diff --git a/man/abort.Rd b/man/abort.Rd index 65d3429e0..78d841ffe 100644 --- a/man/abort.Rd +++ b/man/abort.Rd @@ -245,7 +245,7 @@ when an error is thrown with \code{\link{rlang_backtrace_on_error}}. Signalling a condition with \code{inform()} or \code{warn()} displays a message in the console. These messages can be muffled as usual with -\code{\link[base:message]{base::suppressMessages()}} or \code{\link[base:warning]{base::suppressWarnings()}}. +\code{\link[base:suppressMessages]{base::suppressMessages()}} or \code{\link[base:suppressWarnings]{base::suppressWarnings()}}. \code{inform()} and \code{warn()} messages can also be silenced with the global options \code{rlib_message_verbosity} and diff --git a/man/are_na.Rd b/man/are_na.Rd index 11e7b30cb..e869904d4 100644 --- a/man/are_na.Rd +++ b/man/are_na.Rd @@ -31,7 +31,7 @@ is_cpl_na(x) \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#questioning}{\figure{lifecycle-questioning.svg}{options: alt='[Questioning]'}}}{\strong{[Questioning]}} \code{are_na()} checks for missing values in a vector and is equivalent -to \code{\link[base:NA]{base::is.na()}}. It is a vectorised predicate, meaning that its +to \code{\link[base:is.na]{base::is.na()}}. It is a vectorised predicate, meaning that its output is always the same length as its input. On the other hand, \code{is_na()} is a scalar predicate and always returns a scalar boolean, \code{TRUE} or \code{FALSE}. If its input is not scalar, it returns diff --git a/man/as_name.Rd b/man/as_name.Rd index 68322df0d..f0259553e 100644 --- a/man/as_name.Rd +++ b/man/as_name.Rd @@ -24,8 +24,8 @@ a string to \emph{represent} that object with a short description. } } \details{ -\code{rlang::as_name()} is the \emph{opposite} of \code{\link[base:name]{base::as.name()}}. If -you're writing base R code, we recommend using \code{\link[base:name]{base::as.symbol()}} +\code{rlang::as_name()} is the \emph{opposite} of \code{\link[base:as.name]{base::as.name()}}. If +you're writing base R code, we recommend using \code{\link[base:as.symbol]{base::as.symbol()}} which is an alias of \code{as.name()} that follows a more modern terminology (R types instead of S modes). } diff --git a/man/as_string.Rd b/man/as_string.Rd index a99aafa17..01f619e65 100644 --- a/man/as_string.Rd +++ b/man/as_string.Rd @@ -19,7 +19,7 @@ A character vector of length 1. \section{Unicode tags}{ -Unlike \code{\link[base:name]{base::as.symbol()}} and \code{\link[base:name]{base::as.name()}}, \code{as_string()} +Unlike \code{\link[base:as.symbol]{base::as.symbol()}} and \code{\link[base:as.name]{base::as.name()}}, \code{as_string()} automatically transforms unicode tags such as \code{""} to the proper UTF-8 character. This is important on Windows because: \itemize{ diff --git a/man/box.Rd b/man/box.Rd index 325122e4a..c7f8817a0 100644 --- a/man/box.Rd +++ b/man/box.Rd @@ -25,7 +25,7 @@ or vector of classes passed to \code{\link[=inherits_all]{inherits_all()}}.} \item{box}{A boxed value to unbox.} } \description{ -\code{new_box()} is similar to \code{\link[base:AsIs]{base::I()}} but it protects a value by +\code{new_box()} is similar to \code{\link[base:I]{base::I()}} but it protects a value by wrapping it in a scalar list rather than by adding an attribute. \code{unbox()} retrieves the boxed value. \code{is_box()} tests whether an object is boxed with optional class. \code{as_box()} ensures that a diff --git a/man/call2.Rd b/man/call2.Rd index 84d654a96..960539679 100644 --- a/man/call2.Rd +++ b/man/call2.Rd @@ -25,7 +25,7 @@ creating a quoted call: \item By \link[=nse-defuse]{quoting} it. Quoting prevents functions from being called. Instead, you get the description of the function call as an R object. That is, a quoted function call. -\item By constructing it with \code{\link[base:call]{base::call()}}, \code{\link[base:call]{base::as.call()}}, or +\item By constructing it with \code{\link[base:call]{base::call()}}, \code{\link[base:as.call]{base::as.call()}}, or \code{call2()}. In this case, you pass the call elements (the function to call and the arguments to call it with) separately. } diff --git a/man/check_data_frame.Rd b/man/check_data_frame.Rd index 81889f631..b17315798 100644 --- a/man/check_data_frame.Rd +++ b/man/check_data_frame.Rd @@ -43,9 +43,9 @@ check_data_frame(mtcars) try(check_data_frame(1:5)) } \seealso{ -Other input checkers: +Other input checkers: \code{\link{check_type_number}}, \code{\link{check_type_scalar}}, -\code{\link{stop_input_type}()} +\code{\link[=stop_input_type]{stop_input_type()}} } \concept{input checkers} diff --git a/man/check_dots_empty.Rd b/man/check_dots_empty.Rd index e2b7b760c..870808989 100644 --- a/man/check_dots_empty.Rd +++ b/man/check_dots_empty.Rd @@ -53,8 +53,8 @@ f(1, foofy = 4) } \seealso{ -Other dots checking functions: -\code{\link{check_dots_unnamed}()}, -\code{\link{check_dots_used}()} +Other dots checking functions: +\code{\link[=check_dots_unnamed]{check_dots_unnamed()}}, +\code{\link[=check_dots_used]{check_dots_used()}} } \concept{dots checking functions} diff --git a/man/check_dots_unnamed.Rd b/man/check_dots_unnamed.Rd index abb311732..85b517412 100644 --- a/man/check_dots_unnamed.Rd +++ b/man/check_dots_unnamed.Rd @@ -40,8 +40,8 @@ f(1, 2, 3, foofy = 4) try(f(1, 2, 3, foof = 4)) } \seealso{ -Other dots checking functions: -\code{\link{check_dots_empty}()}, -\code{\link{check_dots_used}()} +Other dots checking functions: +\code{\link[=check_dots_empty]{check_dots_empty()}}, +\code{\link[=check_dots_used]{check_dots_used()}} } \concept{dots checking functions} diff --git a/man/check_dots_used.Rd b/man/check_dots_used.Rd index b0e5b9abc..bdf72ed61 100644 --- a/man/check_dots_used.Rd +++ b/man/check_dots_used.Rd @@ -70,8 +70,8 @@ fn() } \seealso{ -Other dots checking functions: -\code{\link{check_dots_empty}()}, -\code{\link{check_dots_unnamed}()} +Other dots checking functions: +\code{\link[=check_dots_empty]{check_dots_empty()}}, +\code{\link[=check_dots_unnamed]{check_dots_unnamed()}} } \concept{dots checking functions} diff --git a/man/check_type_number.Rd b/man/check_type_number.Rd index 67d301ff0..e7f243841 100644 --- a/man/check_type_number.Rd +++ b/man/check_type_number.Rd @@ -74,9 +74,9 @@ try(check_number_whole(3.5)) } \seealso{ -Other input checkers: -\code{\link{check_data_frame}()}, +Other input checkers: +\code{\link[=check_data_frame]{check_data_frame()}}, \code{\link{check_type_scalar}}, -\code{\link{stop_input_type}()} +\code{\link[=stop_input_type]{stop_input_type()}} } \concept{input checkers} diff --git a/man/check_type_scalar.Rd b/man/check_type_scalar.Rd index 589584551..7ae91e510 100644 --- a/man/check_type_scalar.Rd +++ b/man/check_type_scalar.Rd @@ -64,9 +64,9 @@ try(check_string(42)) } \seealso{ -Other input checkers: -\code{\link{check_data_frame}()}, +Other input checkers: +\code{\link[=check_data_frame]{check_data_frame()}}, \code{\link{check_type_number}}, -\code{\link{stop_input_type}()} +\code{\link[=stop_input_type]{stop_input_type()}} } \concept{input checkers} diff --git a/man/cnd_muffle.Rd b/man/cnd_muffle.Rd index 68b9bcf27..8625ba37c 100644 --- a/man/cnd_muffle.Rd +++ b/man/cnd_muffle.Rd @@ -29,10 +29,10 @@ correct restart for you. It is compatible with the following conditions: \itemize{ \item \code{warning} and \code{message} conditions. In this case \code{cnd_muffle()} -is equivalent to \code{\link[base:message]{base::suppressMessages()}} and -\code{\link[base:warning]{base::suppressWarnings()}}. +is equivalent to \code{\link[base:suppressMessages]{base::suppressMessages()}} and +\code{\link[base:suppressWarnings]{base::suppressWarnings()}}. \item Bare conditions signalled with \code{signal()} or \code{\link[=cnd_signal]{cnd_signal()}}. Note -that conditions signalled with \code{\link[base:conditions]{base::signalCondition()}} are not +that conditions signalled with \code{\link[base:signalCondition]{base::signalCondition()}} are not mufflable. \item Interrupts are sometimes signalled with a \code{resume} restart on recent R versions. When this is the case, you can muffle the @@ -45,7 +45,7 @@ you will cause a new error to be signalled. \itemize{ \item Errors are not mufflable since they are signalled in critical situations where execution cannot continue safely. -\item Conditions captured with \code{\link[base:conditions]{base::tryCatch()}}, \code{\link[=with_handlers]{with_handlers()}} or +\item Conditions captured with \code{\link[base:tryCatch]{base::tryCatch()}}, \code{\link[=with_handlers]{with_handlers()}} or \code{\link[=catch_cnd]{catch_cnd()}} are no longer mufflable. Muffling restarts \emph{must} be called from a \link{calling} handler. } diff --git a/man/defusing-advanced.Rd b/man/defusing-advanced.Rd index f62aaeafd..179874466 100644 --- a/man/defusing-advanced.Rd +++ b/man/defusing-advanced.Rd @@ -103,7 +103,7 @@ purposes but rlang provides these other operations, either for completeness or because they are useful to experts. \itemize{ \item \code{exprs()} is the plural variant of \code{expr()}. It returns a list of -expressions. It is like \code{\link[base:list]{base::alist()}} but with +expressions. It is like \code{\link[base:alist]{base::alist()}} but with \link[=nse-inject]{injection} support. \item \code{quo()} and \code{quos()} are like \code{expr()} and \code{exprs()} but return quosures instead of naked expressions. When you are defusing diff --git a/man/dot-data.Rd b/man/dot-data.Rd index 753e28665..c2dc79123 100644 --- a/man/dot-data.Rd +++ b/man/dot-data.Rd @@ -1,6 +1,5 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/eval-tidy.R -\docType{data} \name{dot-data} \alias{dot-data} \alias{.data} @@ -65,4 +64,3 @@ code. Use the unqualified \code{.data} symbol that is automatically put in scope by data-masking functions. } -\keyword{datasets} diff --git a/man/env_bind.Rd b/man/env_bind.Rd index ab426dda3..5cde43ac6 100644 --- a/man/env_bind.Rd +++ b/man/env_bind.Rd @@ -45,7 +45,7 @@ specific problems. \code{env_bind()} is equivalent to \code{\link[base:assign]{base::assign()}}. \item \code{env_bind_active()} takes named \emph{functions} and creates active bindings in \code{.env}. This is equivalent to -\code{\link[base:bindenv]{base::makeActiveBinding()}}. An active binding executes a +\code{\link[base:makeActiveBinding]{base::makeActiveBinding()}}. An active binding executes a function each time it is evaluated. The arguments are passed to \code{\link[=as_function]{as_function()}} so you can supply formulas instead of functions. diff --git a/man/env_get.Rd b/man/env_get.Rd index b4f0deebd..79a5dffd2 100644 --- a/man/env_get.Rd +++ b/man/env_get.Rd @@ -27,7 +27,7 @@ in \code{env}.} environments.} \item{last}{Last environment inspected when \code{inherit} is \code{TRUE}. -Can be useful in conjunction with \code{\link[base:ns-topenv]{base::topenv()}}.} +Can be useful in conjunction with \code{\link[base:topenv]{base::topenv()}}.} \item{nms}{Names of bindings, a character vector.} } diff --git a/man/inherits_any.Rd b/man/inherits_any.Rd index 64b7cd7ae..639730575 100644 --- a/man/inherits_any.Rd +++ b/man/inherits_any.Rd @@ -19,7 +19,7 @@ inherits_only(x, class) } \description{ \itemize{ -\item \code{inherits_any()} is like \code{\link[base:class]{base::inherits()}} but is more explicit +\item \code{inherits_any()} is like \code{\link[base:inherits]{base::inherits()}} but is more explicit about its behaviour with multiple classes. If \code{classes} contains several elements and the object inherits from at least one of them, \code{inherits_any()} returns \code{TRUE}. diff --git a/man/is_function.Rd b/man/is_function.Rd index 5c2f82ef3..2df8326e0 100644 --- a/man/is_function.Rd +++ b/man/is_function.Rd @@ -59,7 +59,7 @@ internal functions in technical documentation. Like primitive functions, internal functions are defined at a low level and written in C. However, internal functions have no representation in the R language. Instead, they are called via a call to -\code{\link[base:Internal]{base::.Internal()}} within a regular closure. This ensures that +\code{\link[base:.Internal]{base::.Internal()}} within a regular closure. This ensures that they appear as normal R function objects: they obey all the usual rules of argument passing, and they appear on the evaluation stack as any other closures. As a result, \code{\link[=fn_fmls]{fn_fmls()}} does not need to diff --git a/man/is_integerish.Rd b/man/is_integerish.Rd index d18136ba9..c18d725f7 100644 --- a/man/is_integerish.Rd +++ b/man/is_integerish.Rd @@ -26,7 +26,7 @@ vector needs to be traversed and checked.} These predicates check whether R considers a number vector to be integer-like, according to its own tolerance check (which is in fact delegated to the C library). This function is not adapted to -data analysis, see the help for \code{\link[base:integer]{base::is.integer()}} for examples +data analysis, see the help for \code{\link[base:is.integer]{base::is.integer()}} for examples of how to check for whole numbers. Things to consider when checking for integer-like doubles: diff --git a/man/missing.Rd b/man/missing.Rd index 47578a69f..70e3ac434 100644 --- a/man/missing.Rd +++ b/man/missing.Rd @@ -1,6 +1,5 @@ % Generated by roxygen2: do not edit by hand % Please edit documentation in R/vec-na.R -\docType{data} \name{missing} \alias{missing} \alias{na_lgl} @@ -9,17 +8,6 @@ \alias{na_chr} \alias{na_cpl} \title{Missing values} -\format{ -An object of class \code{logical} of length 1. - -An object of class \code{integer} of length 1. - -An object of class \code{numeric} of length 1. - -An object of class \code{character} of length 1. - -An object of class \code{complex} of length 1. -} \usage{ na_lgl @@ -74,5 +62,4 @@ typeof(na_int) na_dbl <- NA typeof(na_dbl) } -\keyword{datasets} \keyword{internal} diff --git a/man/names_inform_repair.Rd b/man/names_inform_repair.Rd index fb360f0bd..0d00b1e30 100644 --- a/man/names_inform_repair.Rd +++ b/man/names_inform_repair.Rd @@ -19,7 +19,7 @@ Inform about name repair Name repair messages are signaled with \code{\link[=inform]{inform()}} and are given the class \code{"rlib_message_name_repair"}. These messages can be muffled with -\code{\link[base:message]{base::suppressMessages()}}. +\code{\link[base:suppressMessages]{base::suppressMessages()}}. Name repair messages can also be silenced with the global option \code{rlib_name_repair_verbosity}. This option takes the values: diff --git a/man/new_function.Rd b/man/new_function.Rd index 316a8c097..63156d9fd 100644 --- a/man/new_function.Rd +++ b/man/new_function.Rd @@ -14,7 +14,7 @@ defaults, use \code{\link[=exprs]{exprs()}}.} \item{body}{A language object representing the code inside the function. Usually this will be most easily generated with -\code{\link[base:substitute]{base::quote()}}} +\code{\link[base:quote]{base::quote()}}} \item{env}{The parent environment of the function, defaults to the calling environment of \code{new_function()}} diff --git a/man/new_node.Rd b/man/new_node.Rd index 973108620..c242ed353 100644 --- a/man/new_node.Rd +++ b/man/new_node.Rd @@ -71,7 +71,7 @@ of an integer vector --- save any important objects beforehand!). } \seealso{ \code{\link[=duplicate]{duplicate()}} for creating copy-safe objects and -\code{\link[base:list]{base::pairlist()}} for an easier way of creating a linked list of +\code{\link[base:pairlist]{base::pairlist()}} for an easier way of creating a linked list of nodes. } \keyword{internal} diff --git a/man/ns_env.Rd b/man/ns_env.Rd index fa6da78a3..394b0655d 100644 --- a/man/ns_env.Rd +++ b/man/ns_env.Rd @@ -22,7 +22,7 @@ string. } In the latter two cases, the environment ancestry is searched for -a namespace with \code{\link[base:ns-topenv]{base::topenv()}}. If the environment doesn't +a namespace with \code{\link[base:topenv]{base::topenv()}}. If the environment doesn't inherit from a namespace, this is an error. }} } diff --git a/man/return_from.Rd b/man/return_from.Rd index ef23b9d63..de41a4cc1 100644 --- a/man/return_from.Rd +++ b/man/return_from.Rd @@ -15,7 +15,7 @@ function.} \description{ \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#questioning}{\figure{lifecycle-questioning.svg}{options: alt='[Questioning]'}}}{\strong{[Questioning]}} -While \code{\link[base:function]{base::return()}} can only return from the current local +While \code{\link[base:return]{base::return()}} can only return from the current local frame, \code{return_from()} will return from any frame on the current evaluation stack, between the global and the currently active context. diff --git a/man/rlang-package.Rd b/man/rlang-package.Rd index 11702908c..2f0c86f9e 100644 --- a/man/rlang-package.Rd +++ b/man/rlang-package.Rd @@ -24,6 +24,7 @@ Useful links: Authors: \itemize{ + \item Lionel Henry \email{lionel@posit.co} \item Hadley Wickham \email{hadley@posit.co} } diff --git a/man/splice-operator.Rd b/man/splice-operator.Rd index a815a8a4b..976422c91 100644 --- a/man/splice-operator.Rd +++ b/man/splice-operator.Rd @@ -14,7 +14,7 @@ The two main cases for splice injection are: \itemize{ \item Turning a list of inputs into distinct arguments. This is especially useful with functions that take data in \code{...}, such as -\code{\link[base:cbind]{base::rbind()}}. +\code{\link[base:rbind]{base::rbind()}}. \if{html}{\out{
}}\preformatted{dfs <- list(mtcars, mtcars) inject(rbind(!!!dfs)) @@ -49,7 +49,7 @@ see \ifelse{html}{\link[=topic-inject-out-of-context]{What happens if I use inje \section{Splicing a list of arguments}{ -Take a function like \code{\link[base:cbind]{base::rbind()}} that takes data in \code{...}. This +Take a function like \code{\link[base:rbind]{base::rbind()}} that takes data in \code{...}. This sort of functions takes a variable number of arguments. \if{html}{\out{
}}\preformatted{df1 <- data.frame(x = 1) diff --git a/man/stop_input_type.Rd b/man/stop_input_type.Rd index 886d9040b..8786bbeb3 100644 --- a/man/stop_input_type.Rd +++ b/man/stop_input_type.Rd @@ -87,8 +87,8 @@ check_character(letters) try(check_character(42)) } \seealso{ -Other input checkers: -\code{\link{check_data_frame}()}, +Other input checkers: +\code{\link[=check_data_frame]{check_data_frame()}}, \code{\link{check_type_number}}, \code{\link{check_type_scalar}} } diff --git a/man/switch_type.Rd b/man/switch_type.Rd index 3e136b4ad..109b28656 100644 --- a/man/switch_type.Rd +++ b/man/switch_type.Rd @@ -25,7 +25,7 @@ coerce_class(.x, .to, ...) function. If supplied, this should be a string indicating the target type. A catch-all clause is then added to signal an error stating the conversion failure. This type is prettified unless -\code{.to} inherits from the S3 class \code{"AsIs"} (see \code{\link[base:AsIs]{base::I()}}).} +\code{.to} inherits from the S3 class \code{"AsIs"} (see \code{\link[base:I]{base::I()}}).} } \description{ \ifelse{html}{\href{https://lifecycle.r-lib.org/articles/stages.html#soft-deprecated}{\figure{lifecycle-soft-deprecated.svg}{options: alt='[Soft-deprecated]'}}}{\strong{[Soft-deprecated]}} diff --git a/man/topic-condition-formatting.Rd b/man/topic-condition-formatting.Rd index 84668a4fb..9ba8e3b02 100644 --- a/man/topic-condition-formatting.Rd +++ b/man/topic-condition-formatting.Rd @@ -28,7 +28,7 @@ See the \href{https://style.tidyverse.org/errors.html}{tidyverse error style gui While the rlang package embeds rudimentary formatting routines, the main formatting engine is implemented in the \href{https://cli.r-lib.org/}{cli package}. \subsection{Formatting messages with cli}{ -By default, rlang uses an internal mechanism to format bullets. It is preferable to delegate formatting to the \href{https://cli.r-lib.org/}{cli package} by using \code{\link[cli:cli_abort]{cli::cli_abort()}}, \code{\link[cli:cli_abort]{cli::cli_warn()}}, and \code{\link[cli:cli_abort]{cli::cli_inform()}} instead of the rlang versions. These wrappers enable cli formatting with sophisticated paragraph wrapping and bullet indenting that make long lines easier to read. In the following example, a long \code{!} bullet is broken with an indented newline: +By default, rlang uses an internal mechanism to format bullets. It is preferable to delegate formatting to the \href{https://cli.r-lib.org/}{cli package} by using \code{\link[cli:cli_abort]{cli::cli_abort()}}, \code{\link[cli:cli_warn]{cli::cli_warn()}}, and \code{\link[cli:cli_inform]{cli::cli_inform()}} instead of the rlang versions. These wrappers enable cli formatting with sophisticated paragraph wrapping and bullet indenting that make long lines easier to read. In the following example, a long \code{!} bullet is broken with an indented newline: \if{html}{\out{
}}\preformatted{rlang::global_entrace(class = "errorr") #> Error in `rlang::global_entrace()`: diff --git a/man/try_fetch.Rd b/man/try_fetch.Rd index c52ee2f75..0fe1253b9 100644 --- a/man/try_fetch.Rd +++ b/man/try_fetch.Rd @@ -129,6 +129,6 @@ handler is called. Because the call stack is preserved, this makes it possible to capture a full backtrace from within the handler, e.g. when rethrowing the error with \code{abort(parent = cnd)}. Technically, \code{try_fetch()} is more similar to (and implemented on -top of) \code{\link[base:conditions]{base::withCallingHandlers()}} than \verb{tryCatch().} +top of) \code{\link[base:withCallingHandlers]{base::withCallingHandlers()}} than \verb{tryCatch().} } diff --git a/man/vector-coercion.Rd b/man/vector-coercion.Rd index 5a5d6c9f0..db04b7463 100644 --- a/man/vector-coercion.Rd +++ b/man/vector-coercion.Rd @@ -75,7 +75,7 @@ extra type check. \code{as_list()} only coerces vector and dictionary types (environments -are an example of dictionary type). Unlike \code{\link[base:list]{base::as.list()}}, +are an example of dictionary type). Unlike \code{\link[base:as.list]{base::as.list()}}, \code{as_list()} removes all attributes except names. } diff --git a/man/with_env.Rd b/man/with_env.Rd index ad1d1b3c2..538560977 100644 --- a/man/with_env.Rd +++ b/man/with_env.Rd @@ -26,7 +26,7 @@ some subtle implications when evaluting stack sensitive functions (see help for \code{\link[=eval_bare]{eval_bare()}}). \code{locally()} is equivalent to the base function -\code{\link[base:eval]{base::local()}} but it produces a much cleaner +\code{\link[base:local]{base::local()}} but it produces a much cleaner evaluation stack, and has stack-consistent semantics. It is thus more suited for experimenting with the R language. }