networks
head
find the head of a directed edge
Calling Sequence
Parameters
Description
Examples
head(G)
head(e, G)
head(eset, G)
G
-
graph or network
e
edge of G
eset
set or list of edges of G
Important:The networks package has been deprecated. Use the superseding package GraphTheoryinstead.
If a single argument G is passed then a table is returned.
If a single edge e is passed the either the head of e or NULL is returned depending on whether or not e is directed.
If a set of edges eset is passed then a set or list of head vertices is returned.
This routine is normally loaded via the command with(networks) but may also be referenced using the full name networks[head](...).
Important:The networks package has been deprecated. Use the superseding pakcage GraphTheoryinstead.
with⁡networks:
new⁡G:
addvertex⁡1,2,3,4,5,G:
addedge⁡1,2,2,3,3,4,4,5,G
e1,e2,e3,e4
addedge⁡1,5,G
e5
head⁡,G
head⁡G
table⁡e3=4,e1=2,e2=3,e4=5
head⁡e1,e2,e5,G
2,3
See Also
GraphTheory
networks(deprecated)[edges]
networks(deprecated)[ends]
networks(deprecated)[incident]
networks(deprecated)[tail]
with
Download Help Document