> -----Original Message----- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of Nicolás Sánchez > Sent: Wednesday, March 13, 2013 9:30 AM > To: r-help@r-project.org > Subject: [R] Numeric Class to Nominal class > > Hello everybody! > > I have a question. I am working with R and I am loading a .txt from my > computer. This file contains a set of features from patients with > numerical > values and the score, that determines the gravity of the disease( from > 0 to > 3). Due to I want to obtain a classification of my patients using > SVM,neural networks or C.4.5, I think I need to "convert" the numeric > class > to nominal class, not? > I have thought to make a easy modification. The score is from 0 to 3. > So, I > have converted "0" to nominal class "g0", and successively. But I am > not > sure if this is the correct way to do it. Any information is welcome. > > Thanks! >
I would convert it to an ordered factor. See ?factor Hope this is helpful, Dan Daniel J. Nordlund Washington State Department of Social and Health Services Planning, Performance, and Accountability Research and Data Analysis Division Olympia, WA 98504-5204 ______________________________________________ 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.