trans: transpose a data frame

Description Usage Arguments Details Value Examples

Description

transpose a data frame

Usage

1
trans(x, row.names = T, col.names = T)

Arguments

x

a data frame to be transposed

row.names

logical to define if the new rowname should be of the original colnames

col.names

similar to the row.names

Details

Transpose a data frame probably with dimnames. If there are column names or row names, you can determine wether to have them also transposed.

Value

a transposed data frame.

Examples

1
2
3
df <- data.frame(A = c(1:4),B = c(2:5),C = c(3,6))
rownames(df) <- letters[1:4]
trans(df)

Tyelcie/getBored documentation built on May 3, 2019, 4:02 p.m.