import_graph {DiagrammeR} | R Documentation

## Import a graph from various graph formats

### Description

Import a variety of graphs from different graph formats and create a graph object.

### Usage

    import_graph(graph_file, file_type = NULL, graph_name = NULL,
      graph_time = NULL, graph_tz = NULL)

### Arguments

`graph_file` | a connection to a graph file.
`file_type` | the type of file to be imported. Options are: `graphml` (GraphML), `gml` (GML), and `sif` (SIF). If not supplied, the function will infer the type by its file extension.
`graph_name` | an optional string for labeling the graph object.
`graph_time` | a date or date-time string (required for insertion of graph into a graph series of the type `temporal`).
`graph_tz` | an optional value for the time zone (`tz`) corresponding to the date or date-time string supplied as a value to `graph_time`. If no time zone is provided then it will be set to `GMT`.

### Value

a graph object of class `dgr_graph`.

[Package DiagrammeR version 0.8.2 Index]