RC_transpose: RC_transpose

Description Usage Arguments Author(s) References Examples

View source: R/RC_transpose.R

Description

Just a function to transpose a dataframe in case of you IT is afraid of giving you some RAM because you already burnt 3 times the servers with you shitty skills in programming.

Usage

1

Arguments

Data

The Dataframe you want to transpose

verbose

If TRUE then the function will prompt i for every i modulo 100 == 0. Set to TRUE by default.

Author(s)

Benjamin Vittrant

References

Type Transpose on google.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
  RC_transpose = function(Data, verbose = T){
    tmp = matrix(ncol = nrow(Data), nrow = ncol(Data), NA) 
    # We just loop to transfert row in col and col in row
    for(i in 1:nrow(tmp)){
      tmp[i,] = Data[,i]
      if(verbose == T & i
    }
    colnames(tmp) = row.names(Data)
    rownames(tmp) = colnames(Data)
    return(tmp)
  }

bvittrant/RCommon documentation built on May 4, 2020, 3:04 p.m.