tidy_edge: Tidy up pathway by combining edges inside of...

Description Usage Arguments Value Examples

Description

Combine edges that share nodes and have other commonalities

Usage

1
2
tidy_edge(edges, edge_id, data_added = FALSE, by_significance = FALSE,
  by_number = TRUE)

Arguments

edges

The edge dataframe

edge_id

The numeric value for the edge_id

data_added

A logical indicator; set to TRUE if data is added

by_significance

A logical indicator; option if data is added

by_number

A logical indicator; gives rough estimate of edge amount

Value

A data frame that has had the given edge condensed for viewing

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
## Not run: 
if (tidy_edge == TRUE) {
   edge_IDs <- seq(min(expanded_edges$edgeID), max(expanded_edges$edgeID))
   for (i in edge_IDs){
     if(data_added == TRUE){
       expanded_edges <- tidy_edge(edges = expanded_edges,
                                   edge_id = edge_IDs[i], 
                                   data_added = TRUE,
                                   by_significance = TRUE)
     }
     if(data_added == FALSE){
       expanded_edges <- tidy_edge(edges = expanded_edges,
                                   edge_id = edge_IDs[i], 
                                   data_added = FALSE)
     }
   }

}

## End(Not run)

shanawhite-UC/KEGGlincs documentation built on May 29, 2019, 8:07 p.m.