Learn R Programming

shard (version 0.1.0)

scratch_matrix: Get a scratch matrix

Description

Allocates (or reuses) a double matrix in the worker scratch pool.

Usage

scratch_matrix(nrow, ncol, key = NULL)

Value

A double matrix of dimensions nrow by ncol.

Arguments

nrow, ncol

Dimensions.

key

Optional key to control reuse. Defaults to a shape-derived key.

Examples

Run this code
m <- scratch_matrix(10, 5)
dim(m)

Run the code above in your browser using DataLab