[R] 2 samples KS-test...

Stéphane CRUVEILLER
Mon, 16 Apr 2007 09:52:13 -0000

Dear R-users,

I have some trouble to perform a 2-samples KS test.
Apparently my 2 samples are numerical (see below) but R
complains that the "y" term is not....

-------------------------------------------------------------------------------------
 > str(subset(mydata,Identified=="NO",select=KD))
'data.frame':   2889 obs. of  1 variable:
 $ KD: num  -0.272 -0.080 -0.311 -0.222 -0.346 ...
 > str(subset(mydata,Identified=="YES",select=KD))
'data.frame':   443 obs. of  1 variable:
 $ KD: num  -0.0772 -0.6635 -0.1283 -0.0748 -0.3036 ...
 >
ks.test(x=subset(mydata,Identified=="NO",select=KD),y=subset(mydata,Identified=="YES",select=KD))
Erreur dans ks.test(x = subset(mydata, Identified == "NO", select =
KD),  :
        'y' doit ?tre num?rique ou bien une cha?ne de caract?res donnant
le nom de la fonction ad?quate
-----------------------------------------------------------------------------------------

Thanks for any hint,

St?phane.

Conf: R-2.4.1 on win XP sp2.

--
"La science a certes quelques magnifiques r?ussites ? son actif mais
? tout prendre, je pr?f?re de loin ?tre heureux plut?t qu'avoir
raison."
D. Adams
--
AGC website <http://www.genoscope.cns.fr/agc>
	St?phane CRUVEILLER Ph. D.
Genoscope - Centre National de S?quencage
Atelier de G?nomique Comparative
2, Rue Gaston Cremieux CP 5706
91057 Evry Cedex - France
Phone: +33 (0)1 60 87 84 58
Fax: +33 (0)1 60 87 25 14
scruveil at genoscope.cns.fr