[R] Need help on distance matrix

From: Lassana TOURE <lassana.toure_at_ier.ml>
Date: Wed, 9 Jan 2008 09:15:56 -0000


Hi

I have a data like this.

79

77.51

79.64

84.08

71.6

90.22

91.46

89.49

94.51

97.45

97.99

97.86

69.88

77.44

72.44

74.21

72.54

78.27

82.03

78.62

80.4

85.97

86.22

84.04

I try to do a distance matrix. I get error if I run the following program:

D2 <- matrix(0,n,n)

for (i1 in 1:n)

for (i2 in 1:n)

D2[i1,i2] <- (X[i1,1]-X[i2,1])^2 + (X[i1,2]-X[i2,2])^2  

I need help

thanks    


I am using the free version of SPAMfighter for private users. It has removed 337 spam emails to date.
Paying users do not have this message in their emails. Try SPAMfighter <http://www.spamfighter.com/len> for free now!

        [[alternative HTML version deleted]]



R-help_at_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. Received on Wed 09 Jan 2008 - 16:15:33 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 09 Jan 2008 - 16:30:06 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive