bf: sequence for looping over an object

Description Usage Arguments Value Examples

View source: R/f0.rbsb1.code.r

Description

This function returns 1:length(x) when length(x) > 0 and numeric(0) otherwise. Quite useful to prevent starting a loop of length nought

Usage

1
bf(x)

Arguments

x

vector

Value

1:length(x) if length(x) > 0 else numeric(0).

Examples

1
2
3
4
 bf(0);
 bf(5);
 bf(character(0));
 bf(letters);

rbsb documentation built on May 2, 2019, 4:41 p.m.

Related to bf in rbsb...