Created
May 15, 2013 13:12
-
-
Save sashaphanes/5583909 to your computer and use it in GitHub Desktop.
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
setwd("C:/Users/Sasha/Google Drive/LNGstuff/Human") | |
maoa = read.csv("mergedAtransposed.csv") | |
maob = read.csv("mergedBtransposed.csv") | |
test.result = mapply(t.test, maoa, maob) | |
p.values = stack(mapply(function(x, y) t.test(x,y)$p.value, maoa, maob)) | |
matrix.maoa = as.matrix(maoa) | |
matrix.maob = as.matrix(maob) | |
fun = Vectorize(function(i,j) t.test(matrix.maoa[,i],matrix.maob[,j])$p.value) | |
res = outer(1:27,1:27,FUN = "fun") | |
image(1:27,1:27,res,axes=FALSE,xlab="MAOA",ylab="MAOB") | |
axis(1, at = 1:27,labels=colnames(maoa)) | |
axis(2, at = 1:27,labels=colnames(maoa)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment