factor level 맞추기

Published by 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
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x