Skip to contents

Get chunk size for matrix operations

Set chunk size for matrix operations

Usage

chunkSize(x)

# S4 method for class 'ResidualMatrixGLM'
chunkSize(x)

chunkSize(x) <- value

# S4 method for class 'ResidualMatrixGLM,numeric'
chunkSize(x) <- value

Arguments

x

ResidualMatrixGLM

value

new value of chunk size

Value

chunk size for matrix operations

Examples

library(BatchRegression)
library(fastglmm)

n <- 100
m <- 5
nc <- 2
set.seed(1)
Y <- matrix(rpois(n * m, 100), m, n)
X <- matrix(rnorm(n * nc), n, nc)
X <- cbind(1, X) # intercept term
colnames(X) <- seq(ncol(X))
rownames(Y) <- seq(m)

# negative.binomial
fam <- negative.binomial(4)
fit <- glmFitResponses(Y, X, fam)

# residuals
R <- ResidualMatrixGLM(Y, X, fit = fit)

# get chunkSize 
chunkSize(R)
#> [1] 1000

# set chunkSize 
chunkSize(R) <- 200