# determine gene degree
pandaFiles = importPandaMatlab()
indegree <- ddply(pandaFiles[,2:ncol(pandaFiles)], .(targer), numcolwise(sum))
row.names(indegree) <- indegree[,1]
indegree <- indegree[,-1]
# to export the file
networkfiles = list.files(pattern="numeric")
write.table(indegree,paste("indegree_",networkfiles,sep=""),
sep="\t",quote=F,row.names=T,col.names=T)
Run the code above in your browser using DataLab