stat_summery | R Documentation |
stat_summery
returns statistics summaries of nodes as well as a vector
of Javascript codes describing the summaries.
stat_summery( obj_mapper, groups_ind, dat = NULL, folder = "", add_surv_analysis = FALSE, add_analysis_js = NULL, color_code )
obj_mapper |
An object of class |
groups_ind |
A vector of group names each of the samples belongs to. |
dat |
Optional. A dataframe contains additional information of samples.
If |
folder |
The name of the folder to save the generated networks. |
add_surv_analysis |
A logical object. |
add_analysis_js |
A vector of Javascript codes summerizing customized statistics. |
color_code |
A color code dataframe. |
This function summarizes the nodes returned by
mapper
. Basic statistics included in this function
are the number of samples N
, the percentage of samples from different
groups groups_per_node
, the groups dominate the nodes
dominant_group
, the percentage of samples from the dominated group
dominant_percent
. It also generates pie plots for nodes which are
saved in /figures
.
If additional information is provided, the function can provide further statistics including median time at diagnosis and median time to death.
The users can also define and add customized statistics to this function. The
customized statistics should be wraped into a vector of Javascript codes for
each of the nodes and passed to add_analysis_js
following the same
order of nodes as in obj_mapper
.
A list includes the statistics and pie plots in folder
/figures
. Details of elements in the list can be found in Detail.
# See ?network_visualization
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.