networkLite Attribute MethodsS3 attribute methods for the networkLite class, for
generics defined in the network package.
# S3 method for networkLite
get.vertex.attribute(x, attrname, ..., null.na = TRUE, unlist = TRUE)# S3 method for networkLite
set.vertex.attribute(
x,
attrname,
value,
v = seq_len(network.size(x)),
...,
upcast = FALSE
)
# S3 method for networkLite
list.vertex.attributes(x, ...)
# S3 method for networkLite
get.network.attribute(x, attrname, ..., unlist = FALSE)
# S3 method for networkLite
set.network.attribute(x, attrname, value, ...)
# S3 method for networkLite
list.network.attributes(x, ...)
# S3 method for networkLite
get.edge.attribute(x, attrname, ..., null.na = FALSE, unlist = TRUE)
# S3 method for networkLite
get.edge.value(x, attrname, ..., null.na = FALSE, unlist = TRUE)
# S3 method for networkLite
set.edge.attribute(
x,
attrname,
value,
e = seq_len(network.edgecount(x, na.omit = FALSE)),
...,
upcast = FALSE
)
# S3 method for networkLite
set.edge.value(
x,
attrname,
value,
e = seq_len(network.edgecount(x, na.omit = FALSE)),
...,
upcast = FALSE
)
# S3 method for networkLite
list.edge.attributes(x, ...)
# S3 method for networkLite
delete.vertex.attribute(x, attrname, ...)
# S3 method for networkLite
delete.edge.attribute(x, attrname, ...)
# S3 method for networkLite
delete.network.attribute(x, attrname, ...)
Behavior and return values are analogous to those of the
corresponding network methods, with network data structured
in the networkLite format.
A networkLite object.
The name of an attribute in x; must be a length one
character vector.
additional arguments
Logical. If TRUE, replace NULL attribute values
with NA in get.vertex.attribute and
get.edge.attribute. Applied before the unlist argument.
Note that the behavior of null.na in network is
somewhat different.
Logical. In get.vertex.attribute and
get.edge.attribute, if unlist is TRUE, we call
unlist on the attribute value before returning it, and if
unlist is FALSE, we call as.list on the
attribute value before returning it. In get.network.attribute,
if unlist is TRUE, we call unlist on the
attribute value before returning it, and if unlist is
FALSE, we return the attribute value without any modification.
The attribute value to set in vertex, edge, and network
attribute setters. For set.vertex.attribute and
set.edge.attribute, value should be either an atomic
vector or a list, of length equal to that of v or e.
For set.edge.value, it should be an n by n
matrix where n is the network size of x.
Indices at which to set vertex attribute values.
Logical. Are we allowed to upcast atomic types when setting
vertex or edge attribute values on the networkLite? Setting
upcast = FALSE prevents upcasting, while setting
upcast = TRUE allows but does not guarantee upcasting.
Indices at which to set edge attribute values.
Allows basic attribute manipulation for networkLites. Note
that an edge or vertex attribute not present in the
networkLite is treated as a list of NULLs of length
equal to the number of edges or vertices (respectively) before
applying the null.na and unlist arguments.