I posted this to the sci.math newsgroup but didn't get any responses so I was hoping someone here could help. I have a number of items with "distances" of differences between each other. What I want to do is to plot each item on a two dimensional plot such that the positions on the plot indicate the approximate distance between each item. What I want to look at, basically, is a map with cities on it but all I have is city pairs with distances between them. How do I go between the pairs of items with distances to a two dimensional map. some sample data follows>From To DistanceItemA ItemA 0 ItemA ItemB 54 ItemA ItemC 43 ItemA ItemD 47 ItemA ItemE 44 ItemA ItemF 63 ItemA ItemG 35 ItemA ItemH 44 ItemA ItemI 43 ItemA ItemJ 79 ItemB ItemA 54 ItemB ItemB 0 ItemB ItemC 55 ItemB ItemD 61 ItemB ItemE 65 ItemB ItemF 72 ItemB ItemG 49 ItemB ItemH 57 ItemB ItemI 54 ItemB ItemJ 68 ItemC ItemA 43 ItemC ItemB 55 ItemC ItemC 0 ItemC ItemD 53 ItemC ItemE 63 ItemC ItemF 74 ItemC ItemG 48 ItemC ItemH 31 ItemC ItemI 59 ItemC ItemJ 58 ItemD ItemA 47 ItemD ItemB 61 ItemD ItemC 53 ItemD ItemD 0 ItemD ItemE 47 ItemD ItemF 52 ItemD ItemG 47 ItemD ItemH 54 ItemD ItemI 50 ItemD ItemJ 85 ItemE ItemA 44 ItemE ItemB 65 ItemE ItemC 63 ItemE ItemD 47 ItemE ItemE 0 ItemE ItemF 65 ItemE ItemG 48 ItemE ItemH 57 ItemE ItemI 49 ItemE ItemJ 92 ItemF ItemA 63 ItemF ItemB 72 ItemF ItemC 74 ItemF ItemD 52 ItemF ItemE 65 ItemF ItemF 0 ItemF ItemG 62 ItemF ItemH 70 ItemF ItemI 58 ItemF ItemJ 103 ItemG ItemA 35 ItemG ItemB 49 ItemG ItemC 48 ItemG ItemD 47 ItemG ItemE 48 ItemG ItemF 62 ItemG ItemG 0 ItemG ItemH 47 ItemG ItemI 40 ItemG ItemJ 80 ItemH ItemA 44 ItemH ItemB 57 ItemH ItemC 31 ItemH ItemD 54 ItemH ItemE 57 ItemH ItemF 70 ItemH ItemG 47 ItemH ItemH 0 ItemH ItemI 54 ItemH ItemJ 63 ItemI ItemA 43 ItemI ItemB 54 ItemI ItemC 59 ItemI ItemD 50 ItemI ItemE 49 ItemI ItemF 58 ItemI ItemG 40 ItemI ItemH 54 ItemI ItemI 0 ItemI ItemJ 85 ItemJ ItemA 79 ItemJ ItemB 68 ItemJ ItemC 58 ItemJ ItemD 85 ItemJ ItemE 92 ItemJ ItemF 103 ItemJ ItemG 80 ItemJ ItemH 63 ItemJ ItemI 85 ItemJ ItemJ 0 Michael Hart -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
On 10/1/99, 9:42 AM +1000, Michael HART wrote:> I have a number of items with "distances" of differences between each > other. What I want to do is to plot each item on a two dimensional plot > such that the positions on the plot indicate the approximate distance > between each item.This doesn't seem like an especially R-related question, but I'll take a stab at it anyway. To plot these distances, won't you need to resolve their positions first? To resolve their positions, you could use a whole lot of methods (there's a seminal paper by Householder whose title I can't remember now -- it's a little paper, but dense). The important thing to note is that a collection of distances doesn't uniquely specify a configuration; if I'm not mistaken, it only specifies configurations up to rigid motion. You need to fix a coordinate system and define one of the points as an origin. In any event, the whole problem seems beyond the scope of this list, unless I'm mistaken. --Steve Stephen R. Laniel | "I've got a match: Carnegie Mellon University | Your embrace and my collapse." laniel at cmu.edu | --They Might Be Giants -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._