as.list.iteror {iterors}R Documentation

Collect all (or some given number of) values from an iteror, returning a vector of the given type.

Description

Collect all (or some given number of) values from an iteror, returning a vector of the given type.

Usage

## S3 method for class 'iteror'
as.list(x, n = as.integer(2^31 - 1), ...)

## S3 method for class 'iteror'
as.double(x, n = as.integer(2^31 - 1), ...)

## S3 method for class 'iteror'
as.numeric(x, n = as.integer(2^31 - 1), ...)

## S3 method for class 'iteror'
as.logical(x, n = as.integer(2^31 - 1), ...)

## S3 method for class 'iteror'
as.character(x, n = as.integer(2^31 - 1), ...)

## S3 method for class 'iteror'
as.vector(x, mode)

Arguments

x

an iterable object

n

the maximum number of elements to return.

...

Unused arguments will throw an error.

mode

What mode to use for the output vector.

Value

The returned value will be n elements long if the iterator did not stop.

See Also

concat take


[Package iterors version 1.0 Index]