data_transpose: Transpose a dataframe

Description Usage Arguments Examples

View source: R/data_transpose.R

Description

Transpose a dataframe. It's the equivalent of using t() but restores the data.frame class, and prints a warning if the data type is modified (see example).

Usage

1
data_transpose(data, verbose = TRUE, ...)

Arguments

data

A data frame, or an object that can be coerced to a data frame.

verbose

Silence warnings and/or messages by setting it to FALSE.

...

Other arguments passed to or from other functions.

Examples

1
2
3
4
transposed <- data_transpose(iris)
transposed[1:5]

transposed <- data_transpose(iris[1:4]) # Only numeric = no warning

datawizard documentation built on Oct. 4, 2021, 9:07 a.m.