Hello,

1. You don't say which library you used (I found by myself)

2. The second structure is wrong

3. What specific way is it supposed to follow?

Hereafter is how I understand it:
> plot(layout, t='n')
> text(layout, unique(c(t(data))))

Regards,
Pascal


2013/9/10 Luca Gaegauf <lucagaegauf@gmx.ch>

> Hey everyone,
>
> I have a small problem understanding how matrices are accessed.
>
> I created 2 matrices:
>
> data <- structure(c("A", "B", "C", "D", "D", "E", "H", "H", "H", "I",
>                     "F", "G", "F", "F", "G", "G", "F", "G", "I", "J"),
>                   .Dim = c(10L, 2L), .Dimnames = list(NULL, c("source",
> "target")))
>
> layout <- structure(c(-3.26366930571836, -5.50712710968822,
> -0.551118328281495, -3.37122322327009, -5.66968864118556,
> -2.33181335195352, -0.48117505795906, -7.44294029152183, -9.97273217503719,
> -8.78752994522558, -8.32625987988611, -5.19337297863283, -1.01252729738437,
> -2.2253279705488, -8.08918461763048, -5.09532606864114, -3.15827376499008,
> -1.940378485401,, 0.600378834777586, 3.57175093511171),
>                     .Dim = c(10L, 2L), .Dimnames = list(NULL,
> c("coordinate.1", "coordinate.2")))
>
> my problem occurs when I try to plot a network:
>
> base.net <- graph.edgelist(data, directed=FALSE)
> plot(base.net, layout=layout)
>
> The network needs to be structured in a very specific way and I don't
> understand in which order the coordinates I created are assigned to the
> nodes. (All nodes are labeled A-J. The coordinates aren't assigned
> alphabetically or in the order of occurrence in the data matrix).
>
> I hope someone can help me out. Thanks in advance!
>
> L
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



-- 
Pascal Oettli
Project Scientist
JAMSTEC
Yokohama, Japan

	[[alternative HTML version deleted]]

