Description Usage Arguments Details Value Author(s) Examples
Drop, add or set the direction of an arc.
1 2 3 4 5 6 7 8 |
x |
an object of class |
from |
a character string, the label of a node. |
to |
a character string, the label of another node. |
check.cycles |
a boolean value. If |
debug |
a boolean value. If |
The set.arc
function operates in the following way:
if there is no arc between from
and to
,
the arc from
-> to
is added.
if there is an undirected arc between from
and
to
, its direction is set to from
- to
.
if the arc to
-> from
is present, it's reversed.
if the arc from
-> to
is present, no action is taken.
The drop.arc
function operates in the following way:
if there is no arc between from
and to
,
no action is taken.
if there is an undirected arc between from
and
to
, it's dropped.
if there is a directed arc between from
and
to
, it's dropped regardless of its direction.
The reverse.arc
function operates in the following way:
if there is no arc between from
and to
,
it returns an error.
if there is an undirected arc between from
and
to
, it returns an error.
if the arc to
-> from
is present, it's reversed.
if the arc from
-> to
is present, it's reversed.
set.arc
and drop.arc
return invisibly an updated
copy of x
.
Marco Scutari
1 2 3 4 5 6 7 8 9 10 | data(learning.test)
res = gs(learning.test)
## use debug = TRUE to get more information.
## Not run:
set.arc(res, "A", "B", debug = TRUE)
drop.arc(res, "A", "B", debug = TRUE)
reverse.arc(res, "A", "D", debug = TRUE)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.