I need a rooted tree from undirected graph as graph objects in R. The problem seems trivial, but I don't find anything. I find layout functions in igraph, but the result is not an igraph object, but a matrix (?!?). suppose the following tree as igraph object:
edges<- c(1,5, 2,5, 3,5, 4,5 ,5,6 ,6,10 ,6,7 ,7,8, 7,9, 10,11 ,6,12, 12,15, 12,13, 13,14) g<-make_graph(edges, n=max(edges), directed = FALSE)
and now i want a igraph object which is rooted tree at node 6. How do I get that?