is.dynamic.vertex.attribute {dynamicnetwork}R Documentation

Checks if an attribute is dynamic

Description

Checks if the passed attribute name is a dynamic (time varying) vertex attribute in the passed dynamic network.

Usage

is.dynamic.vertex.attribute(network, attrname)
is.dynamic.edge.attribute(network, attrname)

Arguments

network dynamicnetwork to look in for vertex attributes
attrname string give name of attribute to look for

Details

checks if the attrname is on the dynam.attr.names network property for vertex, or dyn.edge.attr.names for edges.

Value

TRUE if the attrname is the name of a dynamic attribute, FALSE otherwise

Author(s)

skyebend

Examples

 test <- as.dynamic(network.initialize(5));
 #give vertex 4 a dynamic attribute
test <- set.dynamic.vertex.attribute(test, "color","blue",valid.time=8,v=4);
#also give it a static attribute
test <- set.vertex.attribute(test,"skill","good",v=4);
is.dynamic.vertex.attribute(test,"color");     #true
is.dynamic.vertex.attribute(test,"fred");       #false, not an attribute
is.dynamic.vertex.attribute(test,"skill"); #false, it is static

[Package dynamicnetwork version 0.0-4 Index]