search for: node_edg

Displaying 1 result from an estimated 1 matches for "node_edg".

Did you mean: node_edge
2011 Oct 12
2
How to transfer the variable into function in this code?
...enoted by "vector" my.fun<-function(vector){ return(diff_coex[vector[1],vector[2]]) } # "vector" is a binary vector with length equal to the size of the whole network. # An element of value "1" indicates the inclusion of that gene in the selected sub-network. node_edge<-function(vector){ selected_subset<-which(vector==1) n<-length(selected_subset) node_score<-sum(diff_expr[selected_subset])/sqrt(n) edges<-combn(selected_subset,2) edge_score<-sum(apply(edges,2,my.fun))/sqrt(choose(n,2)) return(c(node_score,edge_sc...