vis.net {NetExplorer} | R Documentation |
Visualize a network
Description
Plots a network
Usage
vis.net(
df,
m,
col.id = NULL,
col.size = NULL,
color = c("black", "white"),
col.color = NULL,
col.shape = NULL,
shapes = NULL,
strokeCol = c("white", "black"),
col.strokeCol = NULL,
col.stroke = NULL,
layers = NULL,
node.opacity = NULL,
link.opacity = FALSE,
background = "grey"
)
Arguments
df |
a data frame with node information. |
m |
a matrix of node connections. |
col.id |
a character or numeric vector indicating the column name or index of node Ids. |
col.size |
a character or numeric vector indicating the column name or index of node size. |
color |
a vector character of length two indicating the range of color for node color. |
col.color |
a character or numeric vector indicating the column name or index of node color. |
col.shape |
a character or numeric vector indicating the column name or index of node shape. |
shapes |
a character vector indicating the type of shape per category. 7 shapes are available: "circle", "cross", "diamond", "rectangle, "star", "triangle", "y" |
strokeCol |
a vector character of length two indicating the range of color for node stroke color. |
col.strokeCol |
a character or numeric vector indicating the column name or index of node stroke color. |
col.stroke |
a character or numeric vector indicating the column name or index of node stroke. |
layers |
a column in argument df indicating the factor to use for multi-layer layout. |
node.opacity |
a character or numeric vector indicating the column name or index of node opacity. |
link.opacity |
a character or numeric vector indicating the column name or index of link opacity. |
background |
a character indicating the background color. |
Details
Opens default web browser and shows 'NetExplorer' interface with the desired network. Further information and tutorial can be found in my video https://youtu.be/IcFTZWCTO_s/
Value
Opens default web browser with the ploted network.
Author(s)
Sebastian Sosa
Examples
vis.net(df,m,col.id = "id", col.size = "strength",
color = c('green', 'yellow'), col.color = "age" ,
strokeCol = c('red', 'blue'), col.strokeCol = "kinship",
col.stroke = "degree",
col.shape = "sex",shapes = c("circle", "triangle"),
layers = "kinship")