1 개요[ | ]
- R rep()
R
Copy
rep("hello", 3)
## [1] "hello" "hello" "hello"
rep("hello", times=3)
## [1] "hello" "hello" "hello"
R
Copy
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
R
Copy
rep(7:9, each=3)
## [1] 7 7 7 8 8 8 9 9 9
R
Copy
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 참고[ | ]
편집자 Jmnote
로그인하시면 댓글을 쓸 수 있습니다.