countIntType {netDx} | R Documentation |
Counts the number of (+,+) and (+,-) interactions in a single network
countIntType(inFile, plusID, minusID)
inFile |
(char) path to interaction networks |
plusID |
(char) vector of + nodes |
minusID |
(char) vector of - nodes |
(numeric of length 2) Number of (+,+) interactions, and non-(+,+) interactions (i.e. (+,-) and (-,-) interactions)
d <- tempdir() # write PSN m1 <- matrix(c("P1","P1","P2","P2","P3","P4",1,1,1),byrow=FALSE,ncol=3) write.table(m1,file=paste(d,"net1.txt",sep=getFileSep()), sep="\t", col.names=FALSE,row.names=FALSE,quote=FALSE) countIntType(paste(d,"net1.txt",sep=getFileSep()),c("P1","P2","P3"), c("P4","P5"))