Description Usage Arguments Value Author(s) Examples
This function takes the output of het_cv_glasso
or
mixglasso
and exports it as a text table in CSV format, where each
entry in the table records an edge in one group and its partial correlation.
1 2 3 4 |
net.clustering |
A network clustering object as returned by
|
file |
Filename to save the network table under. |
node.names |
Names for the nodes in the network. If NULL, names from net.clustering will be used. |
group.names |
Names for the clusters or groups. If NULL, names from net.clustering will be used (by default these are integets 1:numClusters). |
p.corrs.thresh |
Threshold applied to the absolute partial correlations. Edges that are below the threshold in all of the groups are not exported. Using a negative value will export all possible edges (including those with zero partial correlation). |
... |
Further parameters passed to write.csv. |
Function does not return anything.
Frank Dondelinger
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | n = 500
p = 10
s = 0.9
n.comp = 3
# Create different mean vectors
Mu = matrix(0,p,n.comp)
# Define non-zero means in each group (non-overlapping)
nonzero.mean = split(sample(1:p),rep(1:n.comp,length=p))
# Set non-zero means to fixed value
for(k in 1:n.comp){
Mu[nonzero.mean[[k]],k] = -2/sqrt(ceiling(p/n.comp))
}
# Generate data
sim.result = sim_mix_networks(n, p, n.comp, s, Mu=Mu)
mixglasso.result = mixglasso(sim.result$data, n.comp=3)
mixglasso.clustering = mixglasso.result$models[[mixglasso.result$bic.opt]]
## Not run:
# Save network in CSV format suitable for Cytoscape import
export_network(mixglasso.clustering, file='nethet_network.csv',
p.corrs.thresh=0.25, quote=FALSE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.