Created
April 12, 2018 08:59
-
-
Save seabbs/7f68509cb710eac6eab91bdca0ea47ed to your computer and use it in GitHub Desktop.
Sample code for thresher
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#' Load the package | |
library(Thresher) | |
#' Generate random data | |
set.seed(3928270) | |
ranData <- matrix(rnorm(100*12), ncol=12) | |
colnames(ranData) <- paste("G", 1:12, sep='') | |
#' Perform dim reduction | |
thresh1 <- Thresher(ranData) | |
#' Outlier removal and clustering | |
reap1 <- Reaper(thresh1) | |
#' Noise features | |
colnames(ranData)[!reap1@keep] | |
#' Plot remaining features projected onto PC space | |
plot(reap1) | |
#' Optimal number of groups | |
reap1@nGroups | |
#' Heat map of data using only the good features | |
heat(reap1) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment