vertexSignal-accessors: Accessor Functions for PathwaySpace Objects

vertexSignal,PathwaySpace-methodR Documentation

Accessor Functions for PathwaySpace Objects

Description

Get or set 'signal' and 'decay' functions in a PathwaySpace class object.

Usage

## S4 method for signature 'PathwaySpace'
vertexSignal(x)

## S4 replacement method for signature 'PathwaySpace'
vertexSignal(x) <- value

## S4 method for signature 'PathwaySpace'
vertexDecay(x)

## S4 replacement method for signature 'PathwaySpace'
vertexDecay(x) <- value

Arguments

x

A PathwaySpace class object.

value

The new value of the attribute.

Value

Updated PathwaySpace object.

Examples

data('gtoy1', package = 'RGraphSpace')
ps <- buildPathwaySpace(gtoy1, nrc = 100)

# Check vertex names
names(ps)

# Access signal values from all vertices
vertexSignal(ps)

# Modify signal value of a specific vertex
vertexSignal(ps)[1] <- 1

# Modify signal value of specific vertices
vertexSignal(ps)[c("n2","n3")] <- 1

# Set '1s' to all vertices
vertexSignal(ps) <- 1

#----

# Access decay function of a specific vertex
vertexDecay(ps)[["n3"]]

# Modify decay function of a specific vertex
vertexDecay(ps)[["n3"]] <- signalDecay(method = "linear")

# Modify decay functions of two vertices
vertexDecay(ps)[c("n1","n3")] <- list( signalDecay() )

# Modify decay functions of all vertices
vertexDecay(ps) <- signalDecay(method = "weibull", shape = 2)


PathwaySpace documentation built on Aug. 8, 2025, 6:47 p.m.