Rview is an R package that gives the user the ability to create different kinds of visualizations of a network without a need to use of different packages. This package lets you draw a plot, a plot just with labels, an interactive network representation, and a Sankey network representation. The addition of the Shiny package also gives the user different kinds of abilities.
CRAN packages: igraph networkD3 Shiny
library(devtools) install_github("DogaIster/Rview") library(rview) #You will be welcomed to rview. data_load() #Please only use this function if you replace example data files with your own files. #It will give you a preview of your data after usage. draw() #You will be asked to specify the type of the visual representation you want to use. #"p" will draw you a plot with labels, "l" will draw you a plot "just" with the labels, "i" will draw you an interactive network #and "s" will draw you a sankey network.If you write "shiny" it will direct you to use the Shiny library but this will be limited #to interactive network and sankey network. #If you put an invalid input it will warn you to put a valid one. useShiny() #This will allow you to see your interactive or sankey networks using Shiny. #For interactive network you will be able to set the opacity from 0.1 to 1. #For sankey network you will be able to set if you want it to sink right or not.
Data should consist two separate files; one of them is the data for nodes and the other is the data for edges. 1) The data for edges should have three columns named as from, to and type. The example data has only hyperlink as a type but your data can also have mention instead hyperlink. 2) The data for nodes should have four columns named as id, name, node.type and node.group. Name refers to the name that you wanna see in the visual representation. node.type is as the name implies, should be the type of the node such as protein or reaction. Each node.type should have the same number for node.group. In the example data; proteins are one group and reactions are the other one.
library(devtools) install_github("DogaIster/Rview") library(rview)
Sample results can be found here.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.