File: last_lifecycle_warnings.Rd

package info (click to toggle)
r-cran-lifecycle 1.0.3%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 576 kB
  • sloc: sh: 15; makefile: 2
file content (38 lines) | stat: -rw-r--r-- 1,197 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/warning.R
\name{last_lifecycle_warnings}
\alias{last_lifecycle_warnings}
\title{Display last deprecation warnings}
\usage{
last_lifecycle_warnings()
}
\description{
\code{last_lifecycle_warnings()} returns a list of all warnings that
occurred during the last top-level R command, along with a
backtrace.

Use \code{print(last_lifecycle_warnings(), simplify = level)} to control
the verbosity of the backtrace. The \code{simplify} argument supports
one of \code{"branch"} (the default), \code{"collapse"}, and \code{"none"} (in
increasing order of verbosity).
}
\examples{
# These examples are not run because `last_lifecycle_warnings()` does not
# work well within knitr and pkgdown
\dontrun{

f <- function() invisible(g())
g <- function() list(h(), i())
h <- function() deprecate_warn("1.0.0", "this()")
i <- function() deprecate_warn("1.0.0", "that()")
f()

# Print all the warnings that occurred during the last command:
last_lifecycle_warnings()


# By default, the backtraces are printed in their simplified form.
# Use `simplify` to control the verbosity:
print(last_lifecycle_warnings(), simplify = "none")
}
}