R levels()

Jmnote (토론 | 기여)님의 2019년 7월 22일 (월) 20:09 판 (→‎같이 보기)

1 개요

R levels()
  • "Levels Attributes"
x <- factor(c(1,1,1,1,2,2,2,2))
x
## [1] 1 1 1 1 2 2 2 2
## Levels: 1 2
levels(x)[1] <- "low"
levels(x)[2] <- "high"
x
## [1] low  low  low  low  high high high high
## Levels: low high

2 같이 보기

3 참고

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}