Learn R Programming

tinyarray (version 3.0.0)

interaction_to_edges: interaction_to_edges

Description

Split interactions by `sep` and return an edges data.frame.

Usage

interaction_to_edges(df, a = 1, b = 2, sep = ",")

Value

a new data.frame with two columns, one interaction per row

Arguments

df

interactions data.frame

a

column to replicate

b

column to split

sep

a character string to separate b column

Author

Xiaojie Sun

See Also

edges_to_nodes

Examples

Run this code
df = data.frame(a = c("gene1","gene2","gene3"),
b = c("d,f,a,b",
"c,e,g",
"a,b,d"))
interaction_to_edges(df)

Run the code above in your browser using DataLab