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
Run the code above in your browser using DataLab