R-alpha: classical tests for R

Kurt Hornik (Kurt.Hornik@ci.tuwien.ac.at)
Fri, 22 Nov 1996 07:14:04 +0100


Date: Fri, 22 Nov 1996 07:14:04 +0100
Message-Id: <199611220614.HAA04127@aragorn.ci.tuwien.ac.at>
From: Kurt Hornik <Kurt.Hornik@ci.tuwien.ac.at>
To: r-testers@stat.math.ethz.ch
Subject: R-alpha: classical tests for R

Attached is a uuencoded tar.gz file (ctests.tar.gz) containing R code
and, well, some documentation for the following `classical' tests:

	binom.test, chisq.test, cor.test, kruskal.test
	ks.test (NOTE:  Kolmogorov-Smirnov tests)
	mcnemar.test, var.test, wilcox.test

To use, simply untar the file at the top of the R source tree.

Comments/suggestions/bug reports and fixes etc are most welcome.

-kh

***********************************************************************
begin 644 ctests.tar.gz
M'XL(`"5$E3(``^U=>W/;QJ[/O^:GV.K,M)0CV7K9OB>W;NLF3H\GB9V)W?2<
MFR8SM$3;;"A2)2E;3-OO?@'LFP])3FPU/16GTXCD/K!8+/`#%EQO;3^X]XL-
M.GL[.^P!8]V]G2[^R[J['?I77!W&=GN#G=X`"NS!_=Z@O_>`[=P_:0\>3-/,
M2QA[<!4G4?"^OIS?[>QU5T'0:J^Q%Z7)\'Z%8-GY'^SL]7L[N_"VL[.[NY[_
M55QB_N&?^Y.!V\Q_?Z\+;[O]]?I?S67,_WD0Q>.MS$^S.^ZCV^GL#@:U\]_K
M]'N%^>\/^K#^.W=,1^7U-Y__LZ.SYX>NGGKVW7?L<.8-,_8]/@N\D)W!XZ;S
MX^G!#X>NHTNZLQ:+6FS"]EEG:Z?%O##SD\C+@FL?'C6RFW@K#4;^J-%TFL[!
MJQ]^?'%X?';JXD]WAMU$T_&YG[#X@J73X=!/4S_=HI)N9+_.$B!#OIO@NTD2
MGWOG01ADN5%?E#`)@;)!-`J&'E#,LBO?HO(JG\3P+`U2YD4C-@918.<^BR/?
M@4:-$;18XS+QH8VDP>*$-4+HK+'%V'_B*1MZ$4LG_C"XR-DOV`+V$D1!!C0[
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M'%*[[>+`&+1(QB&J=G2YC*"-[PPTBPN)(_-`LZA+*['PB3%?G87#2^D/DLCS
M&&E#`D_)H#^J"O(>B7A-Q><4N*)/7KTZ?(PGJ.+S#CQSREL>)CN-^'?ML:4-
MBS^X$S\UMP,H-95"W(K]I7AS\H:B0FH?H1*LO9Z;I6#GO296[HGNK\U$HNKV
M0-)R],.+`_G)BDQCW71[FU2J-[#25]N4O+H]^)\%.TC:SS$S;^8Y-?7LMK-&
M2YP=NISEE$Y3S]_4_Q64:`SBO<]$]+Z6T3\I1A=\0_6X,MEHZ1G8FFUBDM!#
M:(=X7#D36&(32FQW>TVV*12?:]23NK`\/YB$)`LVS:YT4HB]8V/+O+U(>*)(
MX1PG^OCK`^9HX*E;,@5$6<.6_5@8RS8\O)N=':?PY9/K?@`V:+J1`\1-&0?Y
F<S^`DKXQZ86B&S2>-N[I(ZE/=%#^:CM$Z^N_^?I_MCJZ"P"@````
`
end

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
r-testers mailing list -- For info or help, send "info" or "help",
To [un]subscribe, send "[un]subscribe"
(in the "body", not the subject !)  To: r-testers-request@stat.math.ethz.ch
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-