[R] Nodes & edges with similarity matrix

Seth Falcon sfalcon at fhcrc.org
Wed Aug 29 15:39:19 CEST 2007


Birgit Lemcke <birgit.lemcke at systbot.uzh.ch> writes:

> Hello,
>
> sorry that I interfer, but I tried to do this
>
> The SymTest matrix:
>
>      A   B   C   D   E   F   G
> A 0.3 0.1 0.5 0.7 0.2 0.8 0.1
> B 0.1 0.5 0.4 0.6 0.7 0.3 0.7
> C 0.5 0.4 0.3 0.5 0.1 0.1 0.5
> D 0.7 0.6 0.5 0.4 0.3 0.5 0.7
> E 0.2 0.7 0.1 0.3 0.5 0.2 0.1
> F 0.8 0.3 0.1 0.5 0.2 0.3 0.5
> G 0.1 0.7 0.5 0.7 0.1 0.5 0.1
>
>  >g
> A graphAM graph with undirected edges
> Number of Nodes = 7
> Number of Edges = 28
>
> g <- new("graphAM", adjMat=SymTest, values=list(weight=0))
>  > plot(g)
> Fehler in as.vector(x, "double") : kann nicht nach Vektor umwandeln
> (Error in as.vector(x, "double") : can not convert to vector)
>
> what goes wrong?

I suspect that you have not installed and loaded Rgraphviz which
contains the code to plot graph objects from the graph package.

Without further details, for example the output of sessionInfo(), it
is difficult to say.

+ seth

-- 
Seth Falcon | Computational Biology | Fred Hutchinson Cancer Research Center
BioC: http://bioconductor.org/
Blog: http://userprimary.net/user/



More information about the R-help mailing list