ggdf: Prepares a given node and edge graph list for plotting.

View source: R/04_flowgraph_plots.R

ggdfR Documentation

Prepares a given node and edge graph list for plotting.

Description

Prepares a given node and edge graph list for plotting by function plot_gr; do not use this function on its own.

Usage

ggdf(gr0)

Arguments

gr0

A list containing data frames e and v.

Details

codeggdf adds to the data frames v and e in slot graph from a flowGraph object specifying plotting options as required by plot_gr:

  • v

    • size: a numeric indicating node size.

    • colour: a numeric or string indicating node colour.

    • label: a string indicating the label of a node.

    • label_long: a string indicating teh long label of a node; used in interactive plots in plot_gr.

    • label_ind: a vector of logical variables indicating which nodes to add a label to in a static plot.

    • v_ind: a vector of logical variables indicating which nodes to plot.

  • e

    • colour: a numeric or string indicating edge colour.

    • e_ind: a vector of logical variables indicating which edges to plot.

Value

A list containing data frames e and v, each with additional meta data column.

See Also

flowGraph-class get_phen_meta plot_gr

Examples


 no_cores <- 1
 data(fg_data_pos30)
 fg <- flowGraph(fg_data_pos30$count, class=fg_data_pos30$meta$class,
                 prop=FALSE, specenr=FALSE,
                 no_cores=no_cores)

 gr_ <- ggdf(fg_get_graph(fg))
 head(gr_$v)
 head(gr_$e)


aya49/flowGraph documentation built on Feb. 4, 2024, 6:40 p.m.