Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

network.dynamic.check

Verify a Dynamically Extended Network Object


Description

Checks a networkDynamic object for any activity information that is not correctly specified.

Usage

network.dynamic.check(x, verbose = TRUE, complete = TRUE)
is.networkDynamic(x)

Arguments

x

an object, hopefully of class networkDynamic.

verbose

logical; should output messages be printed to the user?

complete

logical; should a complete test be ran, including checks of the activity matrices for edges and vertices, versus a check of only edge activity invovling non-active vertices

Details

Currently, network.dynamic.check runs three types of checks on an input object:

  1. If a complete test is run, vertex spell matrices and edge spell matrices (if any) are checked for legality, specifically these are checked for correct dimensionality and proper spell ordering.

  2. If vertex and edge spell matrices are correctly specified or assumed to be using complete=FALSE, incident vertices of active edges (if any) are checked to ensure that they are also active during the specified period(s).

  3. If a complete test is run, and any TEA attributes are attached to the network, vertices or edges, they will be checked for correct structure.

If spell matrices are only acted upon by network or networkDynamic methods, there is no need to run a complete test - correct dimensionality and spell ordering are guaranteed.

is.networkDynamic checks if its argument has the class 'networkDynamic'.

Value

For network.dynamic.check: A list of logical vectors, one for each network component checked:

  • $vertex.checks : Whether the spell matrix of each vertex (if any) is correctly specified

  • $edge.checks : Whether the spell matrix of each edge (if any) is correctly specified

  • $dyad.checks : Corresponding to edges, whether the incident vertices of each edge are active when the edge is active

  • $vertex.tea.checks : Corresponding to vertices, whether the vertex has correctly formed TEA attributes

  • $edge.tea.checks : Corresponding to edges, whether the edge has correctly formed TEA attributes

  • $network.tea.checks : Single boolean, whether the network TEA attributes are formed correctly

  • $net.obs.period.check : NULL, if no net.obs.period network attribute is present, otherwise a single boolean, whether the attribute is formed correctly.

For is.networkDynamic: a boolean which is true if the class matches

Author(s)

Ayn Leslie-Cook aynlc3@uw.edu, Carter T. Butts buttsc@uci.edu, Skye Bender-deMoll

See Also

Examples

test <-network.initialize(2) # make a network
  # only activate one vertex
  activate.vertices(test,onset=2,length=5,v=1) 
  test[1,2] <-1 # add an edge between the verticies
  # activate the edge for a spell not including vertex spell
  activate.edges(test,onset=0,terminus=7, e=1) 
  network.dynamic.check(test) # find the bad edge
  
  # name a vertex attrible like a TEA but with the wrong structure
  set.vertex.attribute(test,'letters','a')
  network.dynamic.check(test)

networkDynamic

Dynamic Extensions for Network Objects

v0.10.1
GPL-3
Authors
Carter T. Butts [aut], Ayn Leslie-Cook [aut], Pavel N. Krivitsky [aut], Skye Bender-deMoll [aut, cre], Zack Almquist [ctb], David R. Hunter [ctb], Li Wang [ctb], Kirk Li [ctb], Steven M. Goodreau [ctb], Jeffrey Horner [ctb], Martina Morris [ctb]
Initial release
2020-01-16

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.