[R] A Question about knnFinder

Saptarshi Guha sapsi at pobox.com
Wed May 2 17:15:56 CEST 2007


Hello,
	Thanks to the author for writing knnFinder. I seem to have problem  
with a data set found here (http://www.stat.purdue.edu/~sguha/random/ 
mydata.csv)
	This is the R-Code

ma<-read.csv("~/mydata.csv")
ma<-as.matrix(ma)
rownames(ma)<-NULL
colnames(ma)<-NULL
#ma is a 390x2 matrix

library(knnFinder)
ne<-nn(ma,p=5)

However,  ne$"nn.idx" is the zero matrix and ne$"nn.dist" is the  
matrix whose entries are all 1000.
	Could someone point out where I'm going wrong?
	Thanks
	Saptarshi

Saptarshi Guha | sapsi at pobox.com | http://www.stat.purdue.edu/~sguha

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
Url : https://stat.ethz.ch/pipermail/r-help/attachments/20070502/968e3d2e/attachment.bin 


More information about the R-help mailing list