[R] ignoring some constants

Rishabh Gupta rg117 at ohm.york.ac.uk
Thu May 30 19:06:45 CEST 2002


Hi all,
    I'm trying to use the lda function from the MASS library to perform a discrimant analysis. The problem is that some of the
variables within the data set are constant with relative to grouping variables and the function gives an error. So when I use the
function as:

    > lda(d[11:14], d$set)

where d is the data object, [11:21] is the range of the variables to be analysed, d$set is the grouping variable. It give the
following error:

    Error in lda.default(structure(data.matrix(x), class = "matrix"), ...) :
        variable(s) 1 2 3 4 appear to be constant within groups

Is there anyway that I can get the function to just ignore this error since there are some variables that are not constant within
the groups. As far as I am concerned, the results are not an error and are just part of the data.

If anyone could help me with this it would greatly appreciated.

Many Thanks

Rishabh

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list