BigMatrixFactor: Create a new BigMatrixFactor

Description Usage Arguments Value Examples

View source: R/BigMatrixFactor.R

Description

Create a new BigMatrixFactor

Usage

1
2

Arguments

x

scalar or matrix to be treated as character.

backingfile

character, full path to the file that will contain the data matrix

nrow

integer, number of rows in the matrix we are about to create

ncol

integer, number of columns in the matrix we are about to create

dimnames

list, list(rownames,colnames), as for a typical matrix

levels

character, as for a typical factor

Value

BigMatrixFactor

Examples

1
2
3
4
5
dnames = dimnames=list(letters[1:3],LETTERS[1:3])
levels=c("AA","AB","BB")
x = matrix( sample( levels, 9, replace=TRUE), ncol=3, dimnames=dnames)
ds = BigMatrixFactor(x,tempfile(),levels=levels)
ds = BigMatrixFactor(backingfile=tempfile(),nrow=3,ncol=3,dimnames=dnames,levels=levels)

bigmemoryExtras documentation built on May 2, 2018, 2:07 a.m.