4 ms·
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).
by makeset 9y 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).
4 ms·