Description Usage Arguments Author(s) References Examples
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.
1 | RC_transpose(x)
|
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. |
Benjamin Vittrant
Type Transpose on google.
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)
}
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.