View source: R/map_tests_stf.R
| unrowname | R Documentation |
This internal helper restructures a data frame by adding an identifier column (e.g., file name or test label) and removing row names. It is used by STF parsing functions to attach contextual labels (such as test block names or file names) to expectation or test‑block structures.
unrowname(identifier, ret, label)
identifier |
Character. The identifier to insert into the resulting data frame (typically the name of the list element being processed). |
ret |
List of data frames, usually the output of applying a mapping or extraction function across multiple parsed test blocks. |
label |
Character. Name of the column used to store the identifier
(e.g., |
The function:
extracts the data frame corresponding to identifier,
appends a new column containing the identifier value,
removes row names for clean downstream processing, and
reorders columns so the identifier appears first.
This structure is used by STF mapping helpers such as
nest_expect() and map_tests_stf() to carry forward file or
test labels when constructing unified test‑mapping tables.
A data.frame with an identifier column prepended and row names
removed. The remaining columns retain their original structure.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.