Learn R Programming

covr (version 4.0.0)

display_name: The source file of each trace

Description

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)

Value

A character vector with one path for each trace of x, or NULL

if x has no traces.

Arguments

x

A coverage object.

Examples

Run this code
cov <- code_coverage("f <- function(x) x + 1", "f(1)")
display_name(cov)

Run the code above in your browser using DataLab