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)

Example output

Loading required package: bigmemory

bigmemoryExtras documentation built on Nov. 8, 2020, 5:17 p.m.