tidy_edge {KEGGlincs} | R Documentation

## Tidy up pathway by combining edges inside of edge_mapping_info

### Description

Combine edges that share nodes and have other commonalities

### Usage

    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

    ## 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)

[Package KEGGlincs version 1.13.0 Index]