initializeBigMatrix {oligoClasses} | R Documentation

## Initialize big matrices/vectors.

### Description

Initialize big matrices or vectors appropriately (conditioned on the status of support for large datasets - see Details).

### Usage

    initializeBigMatrix(name=basename(tempfile()), nr=0L, nc=0L, vmode = "integer", initdata = NA)
    initializeBigVector(name=basename(tempfile()), n=0L, vmode = "integer",
      initdata = NA)
    initializeBigArray(name=basename(tempfile()), dim=c(0L,0L,0L),
      vmode="integer", initdata=NA)

### Arguments

`name` | prefix to be used for file stored on disk
`nr` | number of rows
`nc` | number of columns
`n` | length of the vector
`vmode` | mode - "integer", "double"
`initdata` | Default is NA

`dim` | Integer vector indicating the dimensions of the array to initialize

### Details

These functions are meant to be used by developers. They provide means to appropriately create big vectors or matrices for packages like oligo and crlmm (and friends). These objects are created conditioned on the status of support for large datasets.

### Value

If the 'ff' package is loaded (in the search path), then an 'ff' object is returned. A regular R vector or array is returned otherwise.

### Examples

    x <- initializeBigVector("test", 10)
    class(x)
    x
    if (isPackageLoaded("ff"))
      finalizer(x) <- "delete"
    rm(x)
    initializeBigMatrix(nr=5L, nc=5L)
    initializeBigArray(dim=c(10, 5, 3))

[Package oligoClasses version 1.46.0 Index]