R rep()

1 개요[ | ]

R rep()
rep("hello", 3)
## [1] "hello" "hello" "hello"
rep("hello", times=3)
## [1] "hello" "hello" "hello"
rep(7:9, 3)
## [1] 7 8 9 7 8 9 7 8 9
rep(7:9, times=3)
## [1] 7 8 9 7 8 9 7 8 9
rep(7:9, each=3)
## [1] 7 7 7 8 8 8 9 9 9
rep(1:3, each=2, times=2)
## [1] 1 1 2 2 3 3 1 1 2 2 3 3
rep(letters[1:3], each=2, times=2)
## [1] "a" "a" "b" "b" "c" "c" "a" "a" "b" "b" "c" "c"

2 같이 보기[ | ]

3 참고[ | ]

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