[ R ] seq() / seq_along()
seq()
sequence generator
arguments
seq(from = 1, to = 1, by = ((to - from)/(length.out - 1)), length.out = NULL, along.with = NULL, ...)
Typical usage
seq(from, to) # c(from:to) 와 동일 |
seq_along() , seq_len()
seq_along() , seq_len() 함수가 seq와 따로 존재하는 이유는 실행 속도가 조금 빠르기 때문에 많은 양의 시퀀스를
생성할 때 효율을 높이기 위해서 따로 존재.
(1부터 시작하는 시퀀스를 만드는 경우가 많기 때문에)
https://www.rdocumentation.org/packages/base/versions/3.6.2/topics/seq
'빅데이터 > RRRR' 카테고리의 다른 글
[ R ] factor() , R의 categorical variable (0) | 2020.06.07 |
---|---|
[ R ] glm() 함수 , formula 인자식 작성법 , logistic regression 해석 (0) | 2020.06.07 |