Skip to content
Prev 334711 / 398513 Next

seq_len and loops

On 13-12-21 5:57 PM, G?ran Brostr?m wrote:
for (i in seq_len(x - 1) + 1)

should be efficient and safe.  A little less efficient, but clearer would be

for (i in seq_len(x)[-1])

Duncan Murdoch