Network analysis error messages- Some vertex names in edge list are not listed in vertex data frame

Hi everyone, I am new to R studio and programming language. I am trying to run network analysis using a code I found online. I am getting an error: Some vertex names in edge list are not listed in vertex data frame
This is the code i used:
Y_Edge_list_csv <- read_delim("1PhD's work/Write Up/Chapter 3.paper/Data/New Data/Y Edge list.csv.csv",
delim = ";", escape_double = FALSE, trim_ws = TRUE)


Y_Edge_list_csv <- as.matrix(Y_Edge_list_csv)

orderNetwork <- graph.edgelist(Y_Edge_list_csv, directed=TRUE)



plot(orderNetwork, vertex.size = 10, vertex.color = "tomato", vertex.frame.color = NA, vertex.label.cex = .7, vertex.label.color = "black", edge.curved = .1, edge.arrow.size = .3, edge.width = .7)

#adding attributes
Nodes2 <- read_csv("1PhD's work/Write Up/Chapter 3.paper/Data/New Data/Nodes2.csv")

orderNetwork <- graph_from_data_frame(Y_Edge_list_csv, directed = T, vertices = Nodes2)

Please help

It would seem that Nodes2 can't be naively directly used in conjunction with your edge list.
Have you investigated this ?

We would be unable to investigate as your data is private. Plus we lack context, as to how these data sources should/would relate.

If Nodes2 is 'incomplete' you may need to take steps to complete it, assuming such a thing is possible, you would need to decide on what concrete values to use where data is missing.

Thank you, I think i have to make sure that Nodes2 is complete.

This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.