"You can convert an igraph.vs to vertex names with `as_ids`, and vertex ids with `as.vector`."
Gabor On Mon, Jul 6, 2015 at 9:10 AM, seema aswani <[email protected]> wrote: > Hi all, > > I want the matrix not with numbers but with the vertex names as protein > names. I already got the result of pair wise shortest path with its vertex > names. > its class is igraph.vs. Is there any way to convert igraph.vs class in to > matrix..?? > a matrix like > > [,1] [,2] > [1,] "trpA" "tprB" "trpC" trpD" > > That shows as result > > [,1] [,2] > [1,] String,2 String,2 > > Thanks. > > > > On Sun, Jul 5, 2015 at 8:16 PM, seema aswani <[email protected]> wrote: >> >> Hi Gabor, >> Thanks a lot for your response..:) It really helps alot. >> >> On Sun, Jul 5, 2015 at 7:59 PM, Gábor Csárdi <[email protected]> >> wrote: >>> >>> On Sun, Jul 5, 2015 at 4:18 PM, seema aswani <[email protected]> >>> wrote: >>>> >>>> Hi, >>>> Just tried the way you told. But it is giving the resultant matrix in >>>> form of >>>> [,1] [,2] >>>> [1,] Integer,3 Integer,3 >>>> [2,] Integer,3 Integer,3 in your example. This is not giving the result >>>> as 1 2 3 1 2 3 3 2 1 3 2 1 as this. >>> >>> >>> Yes, you need to index the matrix to see the actual result. Lists can >>> contain pretty much any R object, so when your matrix has lists as cells, R >>> cannot really print the contents, there is no guarantee that it would even >>> fit to the screen. >>> >>> G. >>> >>> _______________________________________________ >>> igraph-help mailing list >>> [email protected] >>> https://lists.nongnu.org/mailman/listinfo/igraph-help >>> >> > > > _______________________________________________ > igraph-help mailing list > [email protected] > https://lists.nongnu.org/mailman/listinfo/igraph-help > _______________________________________________ igraph-help mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/igraph-help
