long_to_wide: Long to wide

View source: R/translate_long.R

long_to_wideR Documentation

Long to wide

Description

Convert from long format to wide format, with each level of a given column separated into a different column.

Usage

long_to_wide(data, columns, name_sep = "_", value_sep = ";")

Arguments

data

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

columns

A set of columns containing coded data from within a dataframe.

name_sep

A character used to separate terms in the newly generated column names within the data. The default is set to '_' (i.e. snake_case).

value_sep

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

Value

A dataframe in 'wide' format.

Examples

## Not run: 
wide_data2 <- long_to_wide(long_data, columns, value_sep = 'xxx')

## End(Not run)

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