Learn R Programming

covr (version 4.0.0)

value: Retrieve the execution counts from a coverage object

Description

Retrieve the execution counts from a coverage object

Usage

value(x, ...)

Value

For a coverage object, a named numeric vector with the number of times each traced expression or line was executed, named like the elements of x (see coverage). For a single element, its count.

Arguments

x

a coverage object, or one of its elements.

...

additional arguments passed to methods.

Examples

Run this code
cov <- code_coverage("add <- function(x, y) { x + y }", "add(1, 2)")
value(cov)

Run the code above in your browser using DataLab