Learn R Programming

JointNets (version 2.0.1)

returngraph.kdiffnet: return igraph object from kdiffnet result specified by user input

Description

This function can return an igraph object from kdiffnet result for user to work with directly

Usage

# S3 method for kdiffnet
returngraph(x, type = "task",
  neighbouroption = "task", subID = NULL, index = NULL, ...)

Arguments

x

output generated from kdiffnet function (kdiffnet class)

type

type of graph. There are two options:

  • "task" (difference graph)

  • "neighbour" (zoom into nodes in the difference graph specified further by parameter "index" (node id)

neighbouroption

unused

subID

unused

index

determines which node(s) to zoom into when parameter "type" is "neighbour". This parameter could either be an integer or vector of integers representing node ids (zoom into one node or multiple nodes)

...

unused

Value

an igraph object of graph / subgraph from kdiffnet result specified by user input

Details

the function aims to provide users the flexibility to explore and visualize the graph own their own generated from kdiffnet

Examples

Run this code
# NOT RUN {
library(JointNets)
data(exampleData)
result = kdiffnet(exampleData[[1]], exampleData[[2]],
W = matrix(1,20,20), g = rep(0,20),epsilon = 0.2,
lambda = 0.4,covType = "cov")
graph = returngraph(result)
# }

Run the code above in your browser using DataLab