0
moral   verw    ho       dog
4       1049    1         2
4       2799    1         3
2       8412    4         4
4       2122    1         3
4       2171    1         3
4       2241    1         2
4       3398    1         4

I was normalizing a dataset using noid = data.Normalization(newx,type="n4") but I want to ignore JUST the "moral" column but normalize everything else.

Any help will be greatly appreciated.

Brian Tompsett - 汤莱恩
  • 5,195
  • 62
  • 50
  • 120
cou
  • 5

1 Answers1

0

As David Arenburg suggested in his comment, if you don't pass the moral column to the normalisation routine it will obviously be ignored. If you want it to be included in the normalized dataset you can do something like this:

noid <- data.Normalization(newx[-1], type="n4")
noid <- cbind(moral=newx[1], noid)
Peter Humburg
  • 540
  • 5
  • 15
  • 1
    Colonel Beauvel, he didn't write it though. I simply expanded on his (brief) comment a bit. I would have simply added a comment to the question to point this out, if I could. Not trying to take undue credit here. In any case, if David Arenburg objects to any of this I'm sure he can speak for himself. – Peter Humburg Jul 05 '15 at 13:22