# retrieve vertex attributes after clustering ... :Class 'communities' hidden list of 4

**URL:** <https://igraph.discourse.group/t/retrieve-vertex-attributes-after-clustering-class-communities-hidden-list-of-4/1630>\
**Category:** Usage\
**Tags:** R\
**Created:** [9 August 2023 15:22 UTC](https://igraph.discourse.group/t/retrieve-vertex-attributes-after-clustering-class-communities-hidden-list-of-4/1630 "2023-08-09T15:22:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![astruck](https://avatars.discourse-cdn.com/v4/letter/a/f6c823/32.png) [@astruck](https://igraph.discourse.group/u/astruck)\
**Post date:** [9 August 2023 15:22 UTC](https://igraph.discourse.group/t/retrieve-vertex-attributes-after-clustering-class-communities-hidden-list-of-4/1630/1 "2023-08-09T15:22:15Z")

</div>

I used `graph_from_data_frame(edgelistDF, directed=TRUE, vertices=2colDF)` to construct a graph. `2colDF` holds vertexName and publicationYear (with some NAs in column 2).

If I cluster with an algorithm implemented in igraph I have the `communities$names` to access vertexNames. But I don’t know how the access the second column of `2colDF` and I see `:Class 'communities' hidden list of 6` in RStudio.  
Question 1: How can I access additional vertex attributes in the communities object or do I need to do a manual mapping again?

I also need to use the modern Infomap implementation for clustering larger graphs and then use `make_clusters(myGraph, membership=externalVector, algorithm='Infomap2.7.1)`. `myGraph` has been created as mentioned above including `2colDF`. For the resulting `communities` object I cannot use `$names` and have no clue how to access the vertex attribute in the 2nd column but I see `:Class 'communities' hidden list of 4`.  
Question 2: Is there a way to access hidden lists assuming they hold what I added to the graph?  
Question 3: Should I provide the external membership vector as a named vector?

While I can use `communities[i]` to get names for each `i=0..n-1` groups this only works for igraph clusterings but not after using `make_clusters()`. Is there anything in the documentation I missed?  
Many thanks.
