seq2

0th

Percentile

Increasing sequence of integers in an interval

These helpers take two endpoints and return the sequence of all integers within that interval. For seq2_along(), the upper endpoint is taken from the length of a vector. Unlike base::seq(), they return an empty vector if the starting point is a larger integer than the end point.

Usage
seq2(from, to)

seq2_along(from, x)

Arguments
from

The starting point of the sequence.

to

The end point.

x

A vector whose length is the end point.

Value

An integer vector containing a strictly increasing sequence.

Aliases
  • seq2
  • seq2_along
Examples
library(rlang) # NOT RUN { seq2(2, 10) seq2(10, 2) seq(10, 2) seq2_along(10, letters) # }
Documentation reproduced from package rlang, version 0.2.0, License: GPL-3

Community examples

Looks like there are no examples yet.