#' Replace 0 and 1 in splicing matrix with appoximate value
#'
#' @param splicing matrix
#'
#' @return splicing matrix with 0 and 1 replaced
#' @export
#'
#' @examples
extreme.replace <- function(data) {
rep.extreme <- function(x) {
n <- length(x)
x[x == 0 | x == 1] <- (x[x == 0 | x == 1] * (n - 1) + 0.5)/n
x
}
data.nonextreme <- apply(as.matrix(data), 2, rep.extreme)
data.nonextreme
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.