#' Create a matrix for figure layout of "pair-wise comparisons type"
#'
#' @param numColDF Number of columns in dataframe for which pairwise comparisons are performed.
#' @export
#'
createMatForLayoutInQQplot <- function(numColDF) {
numOfCom <- ncol(combn(numColDF,2))
m.out <- matrix(nrow = numColDF-1, ncol = numColDF-1)
comSeq <- 1:numOfCom
for ( i in 1:nrow(m.out)) {
m.out[i,] <- c(comSeq[1:i], rep(0,numColDF-1-i)) # assigns the first i elements from comSeq to the matrix
comSeq <- comSeq[(i + 1):length(comSeq)] # removes the first i elements from comSeq
}
return(m.out)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.