q_tidyloops: Tidy columns generated in loop and merge blocks.

Description Usage Arguments

Description

Convenience function that takes a data frame and applies gather to columns ending in '(number)', which is how loop and merge data is outputted. By default, it returns key-value results as .loop and .dat

Usage

1
2
q_tidyloops(data, key_col = ".loop", value_col = ".dat",
  pattern = "\\([0-9]+\\)$")

Arguments

data

A data frame

key_col

Strings giving names of key and value columns to create.

pattern

character string containing a regular expression (or character string for fixed = TRUE) to be matched in the given character vector. Coerced by as.character to a character string if possible. If a character vector of length 2 or more is supplied, the first element is used with a warning. Missing values are allowed except for regexpr and gregexpr.


drsimonj/qualtricsr documentation built on May 15, 2019, 2:53 p.m.