R: Verify a Dynamically Extended Network Object

network.dynamic.check {networkDynamic} | R Documentation

## 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

`activity.attribute`, `net.obs.period`

### 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)

[Package networkDynamic version 0.9.0 Index]