Hi Tjun,

It sounds like you need to go on an NA hunt (e.g: find your missing values
in the data).

Maybe try running this code:

ss <- which(apply(is.na(forsen[,-f]), 1, sum)>0)
forsen[ss,-f]

And try to see if you can find these rows.
You can also use the above data to find which rows to remove and see if
that solves your problem.

You might have an empty column or something like that - that is also worth
checking.


Best,
Tal


----------------Contact
Details:-------------------------------------------------------
Contact me: tal.gal...@gmail.com |
Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) |
www.r-statistics.com (English)
----------------------------------------------------------------------------------------------



On Tue, Aug 6, 2013 at 10:51 AM, Tjun Kiat Teo <teotj...@gmail.com> wrote:

> I am trying to use the package mda
>
> And this is my command
>
> mdfit<-mda(factor(forsen[,f]) ~ .,data=forsen[,-f],subclasses=sc)
>
> But I keep getting this error message on a particular data set
>
> Error in maxdist[l] <- x[l, i] :
>   NAs are not allowed in subscripted assignments
>
> Can anyone help ? Thanks
>
>
> Regards
>
> Tjun Kiat
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
  • [R] MDA Tjun Kiat Teo
    • Re: [R] MDA Tal Galili

Reply via email to