Learn R Programming

miic (version 1.5.3)

miic.export: Export miic result to different plotting methods

Description

This function creates an object built from the result returned by miic that is ready to be fed to different plotting methods.

Usage

miic.export(miic.res, method = NULL)

Value

A graph object adapted to the method.

Arguments

miic.res

[a miic graph object] The graph object returned by the miic execution.

method

A string representing the plotting method. Currently only "igraph" is supported.

Details

See the details of specific function for each method. For igraph, see getIgraph.

See Also

getIgraph for details on the igraph exported object.

Examples

Run this code
# \donttest{
library(miic)
data(hematoData)

# execute MIIC (reconstruct graph)
miic.res <- miic(
  input_data = hematoData, latent = "yes",
  n_shuffles = 10, conf_threshold = 0.001
)

# Using igraph
if(require(igraph)) {
g = miic.export(miic.res, "igraph")
plot(g) # Default visualisation, calls igraph::plot.igraph()

# Specifying layout (see ?igraph::layout_)
l <-layout_with_kk(g)
plot(g, layout=l)

# Override some graphical parameters
plot(g, edge.curved = .2)
plot(g, vertex.shape="none", edge.color="gray85", vertex.label.color="gray10")
}

# }

Run the code above in your browser using DataLab