Skip to content

Instantly share code, notes, and snippets.

@bobthecat
Last active December 9, 2015 23:58
Show Gist options
  • Save bobthecat/4347506 to your computer and use it in GitHub Desktop.
Save bobthecat/4347506 to your computer and use it in GitHub Desktop.
## EXTRACTING CLASS LABELS
classLabel <- sub("^ER(.*) breast cancer", "\\1", grep("ER", phenoData$specimen, value=T))
classLabel
[1] "-" "-" "-" "-" "-" "-" "-" "-" "-" "+" "+" "+" "+" "+" "+" "+" "+" "+"
## COMPUTING P-VALUE DISTRIBUTION
minus = which(classLabel=="-")
plus = which(classLabel=="+")
p <- apply(e, 1, function(x){t.test(as.numeric(x[minus]), as.numeric(x[plus]))$p.value})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment