[R] Source Code for Linear Discriminant Analysis

Martin Maechler maechler at stat.math.ethz.ch
Thu May 27 10:30:49 CEST 2004


>>>>> "UweL" == Uwe Ligges <ligges at statistik.uni-dortmund.de>
>>>>>     on Thu, 27 May 2004 08:50:12 +0200 writes:

    UweL> Chris Trengove wrote:
    >> Dear R users,
    >> 
    >> I am not an R user myself, but someone searching the web
    >> for C source code that will do linear discriminant
    >> function analysis.  The only lead I have been able to
    >> locate is that R contains a function called "lda" which
    >> is contained in the MASS package.
    >> (http://stat.ethz.ch/R-manual/R-devel/library/MASS/html/lda.html)
    >> I downloaded the R source file R-1.9.0.tgz, and found a
    >> huge collection of C programs in various package
    >> directories, but I could not find the source file for
    >> lda, nor could I find a directory for the MASS package.
    >> Can anyone help me please?
    >> 
    >> Regards, Chris Trengove.

    UweL> MASS is in the VR package bundle. The current version
    UweL> is available at CRAN: /src/contrib/VR_7.2-2.tar.gz

and to really answer Chris' question:

The MASS source *is* of course inside the R-1.9.0.tgz that
you've downloaded.
Unfortunately (for a good reason, but still unfortunately!)
the recommended packages' sources (and MASS is one of those) are
*still* compressed even after unpacking R-1.9.0.tgz :

After unpacking R-1.9.0.tgz, to see the source, you need to
 unpack (the symbolic link) VR.tgz as well :
 R-1.9.0/src/library/Recommended/VR.tgz
and then VR/MASS/R/lda.R  and (a small part of)  VR/MASS/src/MASS.c

This is a bit unfortunate for those of us who like to search
inside the sources..

NOTE: This is copyrighted and GPL'ed (GNU public licenced) code
      and you are only allowed to use the code accordingly!

Martin Maechler <maechler at stat.math.ethz.ch>	http://stat.ethz.ch/~maechler/
Seminar fuer Statistik, ETH-Zentrum  LEO C16	Leonhardstr. 27
ETH (Federal Inst. Technology)	8092 Zurich	SWITZERLAND
phone: x-41-1-632-3408		fax: ...-1228			<><




More information about the R-help mailing list