dot-pivot_instrument: Pivot instrument

Description Usage Arguments Value

Description

Helper for trim_instrument, handles the actual pivot across particular columns. NOTE: The instrument_regex parameter is what our lab uses across most instruments. If this needs to be changed later or generalizable for other labs, then it's there. For now things work for us just fine.

Usage

1
2
3
4
5
6
7
.pivot_instrument(
  instrument,
  instrument_prefix,
  instrument_regex = "_(.+)_(.+)_(.+)$",
  output_names = c("subtest", "number", ".value"),
  ...
)

Arguments

instrument

One instrument's data

instrument_prefix

Instrument prefix

instrument_regex

The regex associated with the metadata in the field name

output_names

Output names for the capture groups of the regex

...

Other options for pivot_longer()

Value

A pivoted instrument


tsostarics/anrlab documentation built on Dec. 13, 2021, 10:11 a.m.