read_eds | R Documentation |
Read edges' information from a file including all edges and extract edges of one decoration. Accepted formats are tab separated values ('tsv'), semicolon separated values ('csv'), or shapefile ('shp').
read_eds(
site,
decor,
dir = getwd(),
edges = "edges",
nodes = "nodes",
format = "tsv"
)
site |
name of the site. |
decor |
name of the decoration. |
dir |
path to the working folder, by default it is the working directory. |
edges |
name of the edges file (a dataframe or a shapefile). |
nodes |
name of the nodes file (a dataframe or a shapefile). |
format |
file extension indicating a file format from 'tsv' (tab separated values), 'csv' (semicolon separated values) or 'shp' (shapefile). For 'tsv' and 'csv', the files must include node coordinates ( |
subset the dataframe of edges depending on 'site' and 'decor'.
Dataframe of graph edges, including at least the columns "site", "decor", "a", "b", "xa", "ya", "xb", "yb", with values for each edge (row).
## Set data folder
dataDir <- system.file("extdata", package = "iconr")
# Read .tsv file
eds.df <- read_eds(site = "Cerro Muriano", decor = "Cerro Muriano 1",
dir = dataDir, edges = "edges", format = "tsv")
eds.df
## Dataframe of edges
# Read shapefile
eds.df <- read_eds(site = "Cerro Muriano", decor = "Cerro Muriano 1",
dir = dataDir, edges = "edges", format = "shp")
eds.df
## Dataframe of edges
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.