shim_colon: Strict version of ':'

View source: R/shim-colon.R

shim_colonR Documentation

Strict version of :

Description

This version of : throws an error if from is positive and to is zero, to make the error more obvious if you've used 1:length(x) instead of seq_along()

Usage

shim_colon(from, to)

Arguments

from, to

Passed on to seq()

Examples

x <- numeric()
seq_along(x)
lax(1:length(x))

hadley/strict documentation built on July 5, 2025, 6:46 a.m.