Learn R Programming

itertools2 (version 0.1.1)

try_nextElem: Calls iterators::nextElem(). If error, returns default value.

Description

Returns the next element of object. In the case a StopIteration exception is thrown, the default value is returned instead.

Usage

try_nextElem(object, default = NA, silent = TRUE)

Arguments

object
an iterable object
default
default value returned if a StopIteration exception is thrown
silent
Should any errors be suppressed without explicitly notifying the user? Default. Yes

Value

the next element of object