idProperty: Name of the property of an aspect that is an ID

idPropertyR Documentation

Name of the property of an aspect that is an ID

Description

This function returns the name of the property, if an aspect uses IDs for its elements. As example, the aspect NodesAspect has the property id that represents the IDs of the aspect.

Usage

idProperty(aspect)

## Default S3 method:
idProperty(aspect)

## S3 method for class 'NodesAspect'
idProperty(aspect)

## S3 method for class 'EdgesAspect'
idProperty(aspect)

## S3 method for class 'CyGroupsAspect'
idProperty(aspect)

## S3 method for class 'CySubNetworksAspect'
idProperty(aspect)

Arguments

aspect

an object of one of the aspect classes (e.g. NodesAspect, EdgesAspect, etc.)

Details

By default aspects don't have IDs, so only the implemented classes have IDs. Aspects with IDs will be considered in the meta-data aspect to determine properties like: idCounter and elementCount.

Uses method dispatch, so the default return is NULL and only aspect classes with IDs are implemented. This way it is easier to extend the data model.

Value

character; Name of the ID property or NULL

See Also

hasIds(), refersTo(), referredBy(), maxId()

Examples

edges = createEdges(source = c(0,0), target = c(1,2))
idProperty(edges)

frankkramer-lab/RCX documentation built on Feb. 4, 2023, 5:12 p.m.