dot-pivot_instrument: Pivot instrument

.pivot_instrumentR Documentation

Pivot instrument

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

.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 Nov. 6, 2022, 3:54 a.m.