Learn R Programming

neuroim2 (version 0.8.5)

ColumnReader: Create Column Reader Object

Description

Create a new instance of the ColumnReader class for reading column-oriented data.

Usage

ColumnReader(nrow, ncol, reader)

Value

An object of class ColumnReader

Arguments

nrow

Integer specifying number of rows in data

ncol

Integer specifying number of columns in data

reader

Function that takes column indices and returns matrix

Examples

Run this code

reader_func <- function(cols) {
  matrix(rnorm(100 * length(cols)), 100, length(cols))
}
col_reader <- ColumnReader(nrow = 100L, ncol = 10L, reader = reader_func)

Run the code above in your browser using DataLab