factor level 맞추기

Published onesixx on

features = colnames(allDD)

for (f in features){
\tif( (class(allDD[[f]]) == "character") || (class(allDD[[f]]) == "factor"))
\t{
\t\tlevels = unique(allDD[[f]])
\t\tallDD[[f]] = factor(allDD[[f]], level = levels)
\t}
}
Categories: R Reshaping

onesixx

Blog Owner

Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x