replaced class.ind

I was referencing a function from the nnet package and wrote my own
instead