gs_vertex_attr<-,PathwaySpace-method | R Documentation |
Get or set edge and vertex attributes in PathwaySpace class object.
## S4 replacement method for signature 'PathwaySpace'
gs_vertex_attr(x, name, ...) <- value
## S4 replacement method for signature 'PathwaySpace'
gs_edge_attr(x, name, ...) <- value
x |
A PathwaySpace class object. |
name |
Name of the attribute. |
... |
Additional arguments passed to igraph methods. |
value |
The new value of the attribute. |
Updated PathwaySpace object.
data('gtoy1', package = 'RGraphSpace')
ps <- buildPathwaySpace(gtoy1, nrc = 100)
# Get vertex count
gs_vcount(ps)
# Get edge count
gs_ecount(ps)
# Access a specific vertex attribute
gs_vertex_attr(ps, "signal")
# Replace an entire vertex attribute
gs_vertex_attr(ps, "signal") <- 1
# Modify a single value within a vertex attribute
gs_vertex_attr(ps, "signal")["n1"] <- 1
# Access a specific edge attribute
gs_edge_attr(ps, "weight")
# Replace an entire edge attribute
gs_edge_attr(ps, "weight") <- 1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.