GeneralReversetransposefunction: General Reverse Transpose function

Description Usage Arguments Value Examples

Description

General Reverse Transpose function

Usage

1

Arguments

key

A list of variables (columns of the transposed table)

table

A dataframe

Value

A list: first element of the list is a dataframe, the transposed version of the orioginal table. Second element is a key to allow back transposition

Examples

1
2
3
4
5
6
7
8
9
data(tableA);data(TtableA);data(XKA);key<-XKA$key
RtableA=GeneralReversetransposefunction(TtableA,key)
ordertableA <-do.call(order,tableA[c(id1,id2)])
orderRtableA<-do.call(order,RtableA[c(id1,id2)])
identical(nrow(tableA),nrow(RtableA))
identical(lapply(tableA,class),lapply(RtableA,class))
identical(tableA[ordertableA,],RtableA[orderRtableA,])
identical(names(tableA),names(RtableA))
all (lapply(names(tableA),function(x){identical(tableA[ordertableA,x],RtableA[orderRtableA,x])}))

DanielBonnery/BigSyn documentation built on June 28, 2020, 7:18 p.m.