View source: R/func__networkAnalyser__mkNetwork.R
mkNetwork | R Documentation |
This function generates edge and node tables for a network. A user may print its output as an edge file and a node file for network construction.
mkNetwork( assoc = NULL, name.x = "x", name.y = "y", edge.attr = NULL, node.x.attr = NULL, node.y.attr = NULL, node.attr.names = "node", id = "" )
assoc |
A data frame from which the network is created. It may be pre-filtered for some criteria by users. |
name.x |
Column name (character) for the explanatory variable X. |
name.y |
Column name (character) for the response variable Y. |
edge.attr |
A character vector of column names for edge attributes. |
node.x.attr |
A character vector of column names for node attributes of X. |
node.y.attr |
A character vector of column names for node attributes of Y. Vectors node.x.attr and node.y.attr must have the same length. |
node.attr.names |
A character vector for column names of the final data frame of nodes. It should have one more name (the "name" column for node names) than do the vectors node.x.attr and node.y.attr. |
id |
(optional) Network name |
G A Graph object having three slots: id, E and V. E: a data frame for edges and their attributes; V, a data frame for nodes and their attributes; id, an optional parameter for the network name.
Yu Wan (wanyuac@126.com)
assoc <- findPhysLink(...) nwk <- mkNetwork(assoc = assoc[["assoc"]], name.x = "x", name.y = "y", edge.attr = c("beta", "score", "m", "s_d"), node.y.attr = "n_y", node.x.attr = "n_x", node.attr.names = c("allele", "n"), id = "linkage")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.