View source: R/AspectDependencies.R
countElements | R Documentation |
This function returns the number of elements in an aspect.
countElements(x) ## Default S3 method: countElements(x) ## S3 method for class 'RCX' countElements(x) ## S3 method for class 'CyVisualPropertiesAspect' countElements(x) ## S3 method for class 'MetaDataAspect' countElements(x)
x |
an object of one of the aspect classes (e.g. |
Uses method dispatch, so the default methods already returns the correct number for the most aspect classes. This way it is easier to extend the data model.
There are only two exceptions in the core and Cytoscape aspects: Meta-data
and CyVisualProperties
.
Meta-data
is a meta-aspect and therefore not included in Meta-data
, and so its return is NA
.
CyVisualProperties
is the only aspect with a complex data structure beneath.
Therefore its number of elements is just the number of how many of the following properties are set:
network
, nodes
, edges
, defaultNodes
or defaultEdges
.
integer; number of elements. For RCX objects all counts are returned in the vector named by the aspect class.
hasIds()
, idProperty()
, refersTo()
, referredBy()
, maxId()
nodes = createNodes(name = c("ĆDK1","CDK2","CDK3")) edges = createEdges(source = c(0,0), target = c(1,2)) rcx = createRCX(nodes = nodes, edges = edges) countElements(nodes) countElements(rcx)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.