Created
April 11, 2016 21:16
-
-
Save shaheeng/e86662c1c016c38c1c9a8a5612dd58c5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#make a new column factorQuality from the column quality -- make the label column categorical | |
rxFactors(inData = data_classi, outFile = data_classi, overwrite = TRUE, | |
factorInfo = list(factorQuality = list(varName = "quality")),reportProgress=0) | |
#can remove the column quality now | |
ColsToKeep = setdiff(names(data_classi),c('quality')) | |
data_classi = rxDataStep(inData = data_classi, outFile = 'data_classi_temp.xdf',varsToKeep = ColsToKeep, overwrite = TRUE) | |
#rename the label col 'factorQuality' as 'LabelsCol' | |
names(data_classi)[names(data_classi)=='factorQuality'] = 'LabelsCol' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment