Y
Hacker News
new
|
ask
|
show
|
jobs
by
makeset
3121 days ago
Use seq_len(n) instead of 1:n to get an empty vector for n=0.
There's also seq_along(x) instead of 1:length(x).