# Convert from node and edge graph representation to a sparse adjacency matrix representation

### Description

Convert from node and edge graph representation to a sparse adjacency matrix representation

### Usage

1 | ```
graph2Matrix(edges, nodes, symmetric = TRUE)
``` |

### Arguments

`edges` |
A data frame with at least the columns "from" and "to"
referring to edges between ids in the |

`nodes` |
Optional data frame with at least a column named "id"
corresponding to the |

`symmetric` |
Set to |

### Value

A sparse matrix

### See Also

`graphjs`

, `graph2Matrix`

### Examples

1 2 3 | ```
data(LeMis)
M <- graph2Matrix(LeMis$edges, LeMis$nodes)
G <- matrix2graph(M)
``` |