wideToLong: Converts data from wide to long

Description Usage Arguments Examples

View source: R/wideToLong.R

Description

Reads data from clipboard, and melts the data.frame based on the id.vars entered.

Usage

1

Arguments

x

data.frame or data.table. In wide format.

id.vars

Character. Column name from the source data that will be the id of the output.

writeToClipboard

Logical. TRUE or FALSE.

Examples

1
2
3
4
x <- data.table::fread(system.file("extdata", "Newspapers.csv", package = "nladwa"))
x$Date <- as.Date(x$Date)
print(x)
wideToLong(x = x, id.vars = "Date", writeToClipboard = FALSE)

Braja93/braja documentation built on June 1, 2017, 5:19 p.m.