How to write list of communities to csv file?

I used the cluster_louvain function to finding communities in the YouTube-channel network (“lvn” is list):
How can I write to a file the found communities and the vertices that are included in these communities? If I use this:
write.csv2(datalvn, file=“cmnt.csv”)
I get an error:

Error in[[i]], optional = TRUE, stringsAsFactors = stringsAsFactors) :
cannot coerce class ‘“communities”’ to a data.frame