| edge2HPD | R Documentation |
This function will take an edge list and convert it into a basic
HivePlotData object. Further manipulation by
mineHPD will almost certainly be required before the data can
be plotted.
edge2HPD(edge_df = NULL, axis.cols = NULL, type = "2D", desc = NULL, ...)
edge_df |
A data frame containing edge list information. Columns should be node1, node2, edge weight (column names are arbitrary). Edge weight information is optional. If missing, edge weights will be set to 1. |
axis.cols |
A character vector giving the colors desired for the axes. |
type |
One of |
desc |
Character. A description of the data set. |
... |
Other parameters to be passed downstream. |
This function produces a "bare bones" HivePlotData object. The user
will likely have to make some changes manually to the resulting
HivePlotData object before plotting. Alternatively,
mineHPD may be able to extract some information buried in the
data, but even then, the user might need to make some adjustments. See the
examples.
A HivePlotData object.
Jonathan H. Chung, with minor changes for consistency by Bryan A. Hanson.
dot2HPD and adj2HPD
# Create a simple edge list & process it
edges <- data.frame(
lab1 = LETTERS[c(1:8, 7)],
lab2 = LETTERS[c(2:4, 1:3, 4, 2, 2)],
weight = c(1, 1, 2, 2, 3, 1, 2, 3, 1)
)
td <- edge2HPD(edge_df = edges, desc = "Test of edge2HPD")
td.out <- sumHPD(td, plot.list = TRUE)
# compare:
edges
td.out[, c(3, 7, 8)]
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.