R gl()

1 개요[ | ]

R gl()
  • "Generate Factor Levels→ 팩터 레벨 생성"
Usage
gl(n, k, length = n*k, labels = seq_len(n), ordered = FALSE)

2 실행예시[ | ]

gl(2, 8, labels = c("Control", "Treat"))
##  [1] Control Control Control Control Control Control Control Control Treat  
## [10] Treat   Treat   Treat   Treat   Treat   Treat   Treat  
## Levels: Control Treat
gl(2, 1, 20)
##  [1] 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2 1 2
## Levels: 1 2
gl(2, 2, 20)
##  [1] 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2 1 1 2 2
## Levels: 1 2

3 같이 보기[ | ]

4 참고[ | ]

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