simple_visNet | R Documentation |
simple_visNet
generates graphs from the provided Mapper object without
tooltips.
simple_visNet( obj_mapper, filter = NULL, folder = getwd(), color_fun = color_map_Spectral, network_name = "network.html", color_filter = TRUE, groups_ind = NULL, color_code = NULL, color_mix = FALSE, save_network = TRUE, png_output = FALSE, layout_igraph = layout_with_fr )
obj_mapper |
An object of class |
filter |
A vector of filter values from filter functions |
folder |
The name of the folder to save the generated networks. |
color_fun |
The color function that transforms numbers to hex codes. |
network_name |
File name of the html network file. |
color_filter |
A logical object. |
groups_ind |
A vector of group names each of the samples belongs to. |
color_code |
A color code dataframe. |
color_mix |
Boolean. If to display the color of nodes as a mixer of the colors of samples within the nodes, where colors of samples are determined by their associated groups |
save_network |
Boolean. If save the network file. Used for the SHiny app |
simple_visNet
generates graphs from the provided Mapper object without
tooltips. The colors of nodes can be more flexibly defined than in
network_visualization
which is suitable for simulation and
tests. The width of edges is propotional to the percentage of overlapping
between connected nodes.
Users can assign colors to nodes with three different approaches.
If color_filter=TRUE
, the colors of nodes are determined by the
average filter values of samples, and color_fun
will map numeric
values to hex color codes.
If color_filter=FALSE
and color_code=NULL
, and
groups_ind
is provided, the colors of nodes are determined by the
dominated group of samples according to groups_ind
, and colors are
automatically generated by color_fun
.
If color_filter=FALSE
and color_code!=NULL
, the colors of
nodes are determined by the dominated group of samples, and colors are from
color_code
.
Note than the color method should be specified by the users by providing the function with necessary arguments.
An HTML file saved under the location given in folder
. The
HTML file contains the interactive graph generated based on the Mapper
object.
tp_data = chicken_generator(1) tp_data_mapper = mapper.sta(dat = tp_data[,2:4], filter_values = tp_data$Y, num_intervals = 10, percent_overlap = 70) simple_visNet(tp_data_mapper, filter = tp_data$Y)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.