spread_integer {formatters}R 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)


[Package formatters version 0.5.8 Index]