File: evaluate_promise.Rd

package info (click to toggle)
r-cran-testthat 3.2.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,452 kB
  • sloc: cpp: 9,261; ansic: 37; sh: 14; makefile: 5
file content (30 lines) | stat: -rw-r--r-- 752 bytes parent folder | download | duplicates (4)
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
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/evaluate-promise.R
\name{evaluate_promise}
\alias{evaluate_promise}
\title{Evaluate a promise, capturing all types of output.}
\usage{
evaluate_promise(code, print = FALSE)
}
\arguments{
\item{code}{Code to evaluate.}
}
\value{
A list containing
\item{result}{The result of the function}
\item{output}{A string containing all the output from the function}
\item{warnings}{A character vector containing the text from each warning}
\item{messages}{A character vector containing the text from each message}
}
\description{
Evaluate a promise, capturing all types of output.
}
\examples{
evaluate_promise({
  print("1")
  message("2")
  warning("3")
  4
})
}
\keyword{internal}