This retrieves an attribute list for all vertices of the graph.
get_vertex_attributes(g, name)
g | A nctx graph |
---|---|
name | Name of the attribute |
The attribute values for all vertices
library(RUnit) library(nctx) file <- system.file("extdata", "bcde.ctx.dir.graphml", package="nctx") g <- load_graph(file, directed = TRUE) checkEquals(get_vertex_attributes(g, "distance_to_A"), c(0.0000000,0.2938160,1.0000000,0.4637440,0.3066590,0.1263650,0.3882870,0.0927837,0.2409850,0.5995490))#> [1] TRUE#> [1] TRUE