A data.frame. With by = "expression" it is the same as
as.data.frame.coverage(). With by = "line" it has one row for each
function on each line of code (excluding blank lines, comments and lines
with only punctuation such as }) and the columns filename,
functions, line and value, where value is the smallest execution
count of the expressions on that line, so a line only counts as covered
if all its expressions were run. An expression spanning several lines,
such as a loop, only counts for the lines that none of the expressions
inside it are on. percent_coverage(), report() and the other line
based outputs count each line once, with the smallest count of its
functions.
With by = "function" it has one row for each top level R function and
the columns filename, functions, first_line, last_line and
value, where first_line and last_line span the function's traced
code and value is the largest execution count of its expressions, so a
function counts as covered if any of its code was run. Compiled code has
no function names, so it is left out.
With by = "branch" it has one row for each branch measured with
options(covr.branch_coverage = TRUE) (see covr.branch_coverage), and
the columns filename, functions, line and column (where the if
or switch() starts), branch (the index of the branch in its if or
switch()), label and value, the number of times the branch was
taken. It has no rows if branch coverage wasn't measured.