reshape.long: Convert data in wide format to long format

Description Usage Arguments Value

View source: R/Rdata.R

Description

Long format duplicates certain columns and adds rows for which one new column hold values coming from a set of columns in wide format. Does not allow for parallel reshaping.

Usage

1
2
3
4
5
6
7
8
reshape.long(
  d,
  vars = NULL,
  factorColumn = "factor",
  valueColumn = "value",
  factors = as.factor(vars),
  rowNamesAs = NULL
)

Arguments

d

data frame with columns in wide format

vars

columns in wide format by name or index

factorColumn

name of the column to be created for the factor

valueColumn

name of the new column of values that were in wide format

factors

vars can be grouped. For each level of factor a new row is created. Implies that length(vars) is a multiple of length(levels(factor))

rowNamesAs

name of the column that should contain row names

Value

data frame in long format


sboehringer/gwasWeighted documentation built on Dec. 22, 2021, 10:19 p.m.