R/runSOM.R

Defines functions runSOM

Documented in runSOM

#' Run SOM
#'
#' @export
runSOM <- function(x, xdim=15, ydim=15, iter=20){

    x <- as.matrix(x[,setdiff(colnames(x), "sampleID")])
    somGrid <- somgrid(xdim, ydim, topo="hexagonal")
    somModel <- som(x,
                    grid=somGrid,
                    rlen=iter,
                    alpha=c(0.05,0.01),
                    keep.data=TRUE)

    return(somModel)
}
KoenAStam/massive documentation built on April 4, 2020, 2:56 a.m.