Learn R Programming

cards (version 0.3.0)

.lst_results_as_df: Prepare Results as Data Frame

Description

Function takes the results from eval_capture_conditions(), which is a named list, e.g. list(result=, warning=, error=), and converts it to a data frame.

Usage

.lst_results_as_df(x, variable, fun_name)

Value

a data frame

Arguments

x

(named list)
the result from eval_capture_conditions()

variable

(string)
variable name of the results

fun_name

(string)
name of function called to get results in x

Examples

Run this code
msgs <- eval_capture_conditions({
  warning("Warning 1")
  warning("Warning 2")
  letters[1:2]
})

cards:::.lst_results_as_df(msgs, "result", "mean")

Run the code above in your browser using DataLab