
activate.vertex.attribute(x, prefix, value, onset = NULL, terminus = NULL,
length = NULL, at = NULL, v = seq_len(network.size(x)), dynamic.only = FALSE)
activate.edge.attribute(x, prefix, value, onset = NULL, terminus = NULL,
length = NULL, at = NULL, e = seq_along(x$mel), dynamic.only = FALSE)
activate.edge.value(x, prefix, value, onset = NULL, terminus = NULL,
length = NULL, at = NULL, e = seq_along(x$mel), dynamic.only = FALSE)
activate.network.attribute(x, prefix, value, onset = NULL, terminus = NULL,
length = NULL, at = NULL, dynamic.only = FALSE)
get.vertex.attribute.active(x, prefix, onset = NULL, terminus = NULL,
length = NULL, at = NULL, rule = c("any", "all"), na.omit =
FALSE, null.na = TRUE, active.default = TRUE,
dynamic.only = FALSE, require.active = FALSE,
return.tea = FALSE, unlist = TRUE)
get.edge.value.active(x, prefix, onset = NULL, terminus = NULL,
length = NULL, at = NULL, rule = c("any", "all"), active.default = TRUE,
dynamic.only = FALSE, require.active = FALSE, return.tea = FALSE,
unlist = TRUE)
get.network.attribute.active(x, prefix, onset = NULL, terminus = NULL,length = NULL,
at = NULL, rule = c("any", "all"), dynamic.only = FALSE,
return.tea=FALSE,unlist=TRUE)
deactivate.vertex.attribute (x, prefix, onset=NULL, terminus=NULL,
length = NULL, at = NULL, v = seq_len(network.size(x)), dynamic.only = FALSE)
deactivate.edge.attribute (x, prefix, onset = NULL, terminus = NULL,
length = NULL, at = NULL, e = seq_along(x$mel), dynamic.only = FALSE)
deactivate.network.attribute(x, prefix, onset = NULL, terminus = NULL,
length = NULL, at = NULL, dynamic.only = FALSE)
list.vertex.attributes.active(x, onset = NULL, terminus = NULL,length = NULL,
at = NULL, na.omit = FALSE, rule = c("any", "all"),
v = seq_len(network.size(x)), require.active = FALSE,
active.default = TRUE, dynamic.only = FALSE)
list.edge.attributes.active(x, onset = NULL, terminus = NULL,length = NULL,
at = NULL, na.omit = FALSE, rule = c("any", "all"),
e = seq_along(x$mel), require.active = FALSE,
active.default = TRUE, dynamic.only = FALSE)
list.network.attributes.active(x, onset = NULL, terminus = NULL,length = NULL,
at = NULL, na.omit = FALSE, rule = c("any", "all"),
dynamic.only = FALSE)
networkDynamic
objectvalue
is a list
, it is assumed that each element corresponds to an index in v
.value
argument should be considered active for each vertex/edge.value
argument should be considered active for each vertex/edge.onset
or terminus
.e
correspond to elements of x$mel
, including null elements from deleted edges. So if some eactive.default
.NULL
values be replaced with NAs?any
(default) to define active as any active attribute spell during the query interval, or all
to define active as being active over the entire interval.return.tea=TRUE
, will return an (appropriately truncated) activity attribute- a list with the first element a list of values and the second element the spell matrix of corresponding spells matching according to rule
. return.tea=FALSE
only the first (earliest) is returned along with a warning. Note that get.edge.value.active
returns NULL
if no attributes names match, where get.vertex.attribute.active
returns NA
s. Also of null.na=FALSE
and unlist=TRUE
, the index position for returned values may not correspond to the vertex.id because NULL values will be omited.activity.attribute
. Activity can be set for a single time point, using either at
, or by setting onset=terminus. Activity can be set for an interval [onset,terminus), using a valid combination of the onset
, terminus
and length
attributes.
This allows for a wide range of options when specifying spells, but a correct specification must use only one of these forms:
at
onset and terminus
onset and length
terminus and length
If the set
and deactivate
functions are provided with no timing information, the element is activated/deactivated from -Inf
to Inf
. The specified interval spans the period from the onset (inclusive) to the terminus (exclusive), so [onset,terminus). For more details, see activate
The get
query functions will give an error if no timing information is provided.
When the activity arguments have a length greater than 1, the elements are assumed to correspond to the vertex or edge ids that should have that activity specified, not to the elements of value
. In other words, it is possible to use one function call to activate multiple values on multiple vertices with a different activity time on each vertex, but it is not possible to activate multiple values at multiple times on a single vertex with one call.
activate.edge.value
is a wrapper for activate.edge.attribute
.set.vertex.attribute
, get.vertex.attribute
,list.vertex.attributes
,activate.vertices
, activity.attribute
, activate
#initialize network
test<-network.initialize(5)
#activate vertex attribute
test<-activate.vertex.attribute(test,"letter","a",onset=0,terminus=1)
test<-activate.vertex.attribute(test,"number","4",onset=1,terminus=2)
test<-activate.vertex.attribute(test,"number","5",onset=2,terminus=3)
#list active/all vertex attributes
list.vertex.attributes.active(test, onset=0,terminus=3,dynamic.only=TRUE)
list.vertex.attributes.active(test, onset=1,terminus=3,dynamic.only=FALSE)
#get values for specific vertex attribute
get.vertex.attribute.active(test,"letter",onset=2,terminus=3)
#deactive vertex attribute
test <- deactivate.vertex.attribute(test, "letter", onset=0, terminus=3)
list.vertex.attributes.active(test, onset=0,terminus=3,dynamic.only=TRUE)
#initialize edges
test[1,2]<-1
test[2,3]<-1
#activate edge attribute
test<-activate.edge.attribute(test,"number",1,onset=0,terminus=2)
test<-activate.edge.attribute(test,"number",5,onset=2,terminus=5)
test<-activate.edge.attribute(test,"letter","a",onset=1,terminus=4)
#list edge attributes
list.edge.attributes.active(test, onset=0,terminus=4,dynamic.only=TRUE)
list.edge.attributes.active(test, onset=0,terminus=4,dynamic.only=FALSE)
#get values for specific edge attribute
get.edge.value.active(test,"number",onset=3,terminus=4)
#deactive edge attribute
test <- deactivate.edge.attribute(test, "letter", onset=0, terminus=3)
list.edge.attributes.active(test, onset=0,terminus=3,dynamic.only=TRUE)
#activate network attribute
test <- activate.network.attribute(test,"alist",list("a","b"),onset=1,terminus=2)
test <- activate.network.attribute(test,"alist",list("c","d"),onset=2,terminus=3)
test <- activate.network.attribute(test,"aspace",list("1","2"),onset=1,terminus=2)
test <- activate.network.attribute(test,"aspace",list("3","4"),onset=2,terminus=3)
#list network attributes
list.network.attributes.active(test, onset=0,terminus=3,dynamic.only=TRUE)
list.network.attributes.active(test, onset=0,terminus=3,dynamic.only=FALSE)
#get values for specific network attribute
get.network.attribute.active(test,"alist",at=2.5,unlist=FALSE)
#deactive network attribute
test <- deactivate.network.attribute(test, "alist", onset=0, terminus=3)
list.network.attributes.active(test, onset=0,terminus=3,dynamic.only=TRUE)
# activate multiple values on multiple vertices at multiple times
test<-network.initialize(3)
activate.vertex.attribute(test,"letters",c("a","b","c"),onset=c(0,1,2),terminus=c(1,2,3))
# peek at TEA structure using non-TEA attribute query
get.vertex.attribute(test,"letters.active",unlist=FALSE)
Run the code above in your browser using DataLab