wide_to_long: Wide to long

View source: R/translate_wide.R

wide_to_longR Documentation

Wide to long

Description

Convert from wide format to long format based on the prefix for each set of linked values across multiple columns.

Usage

wide_to_long(data, column_stem, name_sep = "_")

Arguments

data

A dataframe containing rows of systematic review data in wide format.

column_stem

A set of column descriptors signifying the groups of columns to condense based on a common stem (e.g. 'hazard' represents 'hazard_low', 'hazard_moderate', and 'hazard_high').

value_sep

A character used to separate values within the data. The default is set to ';'.

Value

A dataframe in 'long' format.

Examples

## Not run: 
long <- wide_to_long(data, column_stem)
long;

## End(Not run)

softloud/sysrevdata documentation built on June 7, 2022, 1:21 p.m.