1 개요[ | ]
- R relevel()
- "Reorder Levels Of Factor"
R
Copy
options(echo=T)
warpbreaks$tension
relevel(warpbreaks$tension, ref = "M")
Loading
R
Copy
df <- read.csv(header=T, stringsAsFactors=T, text="
General,Intell,Power,Chrisma
Liu Bei,High,Low,High
Guan Yu,High,High,High
Zhang Fei,Low,High,Low
Sun Gan,Middle,Low,Low
")
options(echo=T)
df
str(df$Intell)
df$Intell <- relevel(df$Intell, ref="Low")
str(df$Intell)
Loading
2 같이 보기[ | ]
3 참고[ | ]
편집자 Jmnote
로그인하시면 댓글을 쓸 수 있습니다.