[R] G-test function in the stats package or on CRAN?

Hervé Pagès hpages at fhcrc.org
Fri Oct 26 19:35:30 CEST 2012


Hi,

The Biostrings package (Bioconductor) contains a function (g.test(),
not exported) that does a G-test. It was originally written by Peter
Hurd. See:

   https://stat.ethz.ch/pipermail/r-sig-ecology/2008-July/000275.html

Peter Hurd's implementation of g.test() looks very much like the
implementation of stats::chisq.test(), and is clearly based on it.
In particular, the 2 functions are based on the same C function,
rcont2, that used to belong to the R C API. However, in recent
revisions of R-devel, rcont2 was moved to the stats package and
not registered as a "C callable". So it's not accessible anymore
and that breaks Biostrings.

Anyway, g.test() does not belong to Biostrings in the first place.
So my question is: does anybody know if there is already such a function
in the stats package or in a CRAN package? Sounds like it should belong
to stats but I cannot find it.

Thanks,
H.

-- 
Hervé Pagès

Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M1-B514
P.O. Box 19024
Seattle, WA 98109-1024

E-mail: hpages at fhcrc.org
Phone:  (206) 667-5791
Fax:    (206) 667-1319



More information about the R-help mailing list