forked from ThomasGrund/nwcommands
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_nwnodeid.sthlp
executable file
·69 lines (46 loc) · 1.48 KB
/
_nwnodeid.sthlp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
{smcl}
{* *! version 1.0.1 15sept2014 author: Thomas Grund}{...}
{marker topic}
{helpb nw_topical##programming:[NW-2.9] Programming}
{title:Title}
{p2colset 9 18 22 2}{...}
{p2col :_nwnodeid {hline 2} Returns the nodeid of a node given its node label}
{p2colreset}{...}
{title:Syntax}
{p 8 17 2}
{cmdab: _nwnodeid}
[{it:{help netname}}],
{opt nodelab}({help nodelab})
[{opt detail}]
{synoptset 20 tabbed}{...}
{synopthdr}
{synoptline}
{synopt:{opt nodelab}({help nodelab})}nodelab of network node i{p_end}
{synopt:{opt detail}}displays the {help nodeid} and {help nodelab} of node i{p_end}
{synoptline}
{p2colreset}{...}
{title:Description}
{pstd}
Returns the {help nodeid} of a node given its node label specified in {it:nodelab}. Results are stored
in the return vector. When no node with the specified label is found in network {it:netname} and error is thrown. This command is mostly used for programming with networks.
{title:Stored results}
Scalars
{bf:r(nodeid)} nodeid of node
Macros:
{bf:r(netname)} name of the networks
{bf:r(nodelab)} node label of the node
{title:Examples}
{cmd:. webnwuse florentine}
{cmd:. _nwnodeid flomarriage, nodelab(medici)}
{txt}Network: {res}flomarriage
{hline 15}
{txt} Nodeid: {res}9
{txt} Nodelab: {res}medici
{com}. return list
{txt}scalars:
r(nodeid) = {res}9
{txt}macros:
r(netname) : "{res}flomarriage{txt}"
r(nodelab) : "{res}medici{txt}"
{title:See also}
{help _nwnodelab}, {help nodeid}