getLinks | R Documentation |
This function finds the names of the links connected to a set of areas.
getLinks(
areas = NULL,
exclude = NULL,
opts = simOptions(),
internalOnly = FALSE,
namesOnly = TRUE,
withDirection = FALSE,
withTransmission = FALSE
)
areas |
Vector containing area names. It represents the set of areas we are interested
in. If |
exclude |
Vector containing area names. If not |
opts |
list of simulation parameters returned by the function
|
internalOnly |
If |
namesOnly |
If |
withDirection |
Used only if |
withTransmission |
Used only if |
If namesOnly = TRUE
the function returns a vector containing link names
If namesOnly = FALSE
and withDirection = FALSE
, it returns a
data.table
with exactly one line per link and with three columns:
link |
Link name |
from |
First area connected to the link |
to |
Second area connected to the link |
If namesOnly = FALSE
and withDirection = TRUE
, it returns a
data.table
with one or two lines per link and with four columns:
area |
Area name |
link |
Link name |
to |
Area connected to |
direction |
1 if the link connects |
## Not run:
# Get all links of a study
getLinks()
# Get all links with their origins and destinations
getLinks(namesOnly = FALSE)
# Get all links connected to French areas (assuming their names contain "fr")
getLinks(getAreas("fr"))
# Same but with only links connecting two French areas
getLinks(getAreas("fr"), internalOnly = TRUE)
# Exclude links connecting real areas with pumped storage virtual areas
# (assuming their names contain "psp")
getLinks(getAreas("fr"), exclude = getAreas("psp"))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.