spread_integer: Spread an integer to a given length

View source: R/tostring.R

spread_integerR Documentation

Spread an integer to a given length

Description

Spread an integer to a given length

Usage

spread_integer(x, len)

Arguments

x

(integer(1))
number to spread.

len

(integer(1))
number of times to repeat x.

Value

If x is a scalar whole number value (see is.wholenumber()), the value x is repeated len times. Otherwise, an error is thrown.

Examples

spread_integer(3, 1)
spread_integer(0, 3)
spread_integer(1, 3)
spread_integer(2, 3)
spread_integer(3, 3)
spread_integer(4, 3)
spread_integer(5, 3)
spread_integer(6, 3)
spread_integer(7, 3)


formatters documentation built on Sept. 13, 2024, 1:10 a.m.