asGraphProperty {graph} | R Documentation |
This is a generic that returns converts its input to a value suitable
for the property
slot of the propertyHolder-class
virtual class.
asGraphProperty(x, hasWeight)
x |
|
hasWeight |
TRUE or FALSE indicating that the
property list must have an element named "weight" |
If x
is a list, then all of its elements must be named. If it
is a numeric vector, it is converted to a list (using
as.list
). If it is originally numeric, is of length one and has
no names then it is converted to a list with a single element named
"weight".
A named list.
Saikat DebRoy
asGraphProperty(2.0, hasWeight=TRUE) asGraphProperty(c(a=1, b=2))