iter.ref {refer}R Documentation

Convert Reference to Iterable Object

Description

ref methods for use with iter in the eList package. It allows ref objects to be used with the different vector comprehensions in the package and with functions such as lapply in base R.

Usage

## S3 method for class 'ref'
iter(x)

## S3 method for class 'slice'
iter(x)

## S3 method for class 'rfexpr'
iter(x)

Arguments

x

object to be looped across

Value

a vector

Examples

x <- sample(1:10, 5, replace=TRUE)
slice_x <- slice(x, 1:2)

lapply(eList::iter(slice_x), print)

[Package refer version 0.1.0 Index]