Skip to contents

display_name() returns the path of the source file of each trace of a coverage object, relative to the package root, e.g. to keep the coverage of some files with x[display_name(x) %in% files].

Usage

display_name(x)

Arguments

x

A coverage object.

Value

A character vector with one path for each trace of x, or NULL if x has no traces.

Examples

cov <- code_coverage("f <- function(x) x + 1", "f(1)")
display_name(cov)
#> source.R190e1ecc253d:1:6:1:22:6:22:1:1 
#> "/tmp/RtmpvpKgL4/source.R190e1ecc253d"