Removing edges from a complete graph to make it a planar maximally filtered graph
0
0
Entering edit mode
@dbd50597
Last seen 2.8 years ago
United States

I have a complete graph from a 6 by 6 correlation matrix. Naturally, it has 15 edges. I'm looking for a way to make R identify which edges need to be eliminated in order to make the graph a planar maximally filtered graph. I have a graph which comes from the matrix "corr.214"

```corformelt <- corr.214 corformelt[upper.tri(corformelt)] <- 42 corformelt <- melt(corformelt) corformelt <- filter(corformelt, value != 42) %>% filter(Var1 != Var2) corformelt <- arrange(corformelt,desc(value)) corformelt corf.g <- graph_from_data_frame(corformelt,directed = FALSE)

``corf.g.nel <- as_graphnel(corf.g) require(RBGL) corf.plan.try <- makeMaximalPlanar(corf.g.nel) try.again <- as.data.frame(t(corf.plan.try$new graph`)) try.again.plot <- graph_from_data_frame(try.again,directed = FALSE)

I make it a graphnel object, and then use the makeMaximalPlanar function. I don't understand the output of the makeMaximalPlanar function. The matrix it returns under $new graph creates a graph that has 15 edges. This doesn't make sense to me, as I thought a PMFG with 6 veritces should have 3(n-2) = 12 edges. Can someone help me interpret what makeMaximalPlanar does?

RBGL • 706 views
ADD COMMENT

Login before adding your answer.

Traffic: 674 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6