emptyMatrix: emptyMatrix

Description Usage Arguments Value Examples

Description

Creates an uninitialized matrix (that is, assigns values according to what was allocated in the memory)

Usage

1

Arguments

nrow, ncol

number of rows and columns

Value

A numeric matrix of dim nrow x ncol.

Examples

1
2
3
4
5
6
mat <- emptyMatrix(10, 10)

# Initialize matrix with 1000000 entries
require(microbenchmark)
microbenchmark(matrix(, 100, 10000))
microbenchmark(emptyMatrix(100, 10000))

naolsen/emptyInit documentation built on May 23, 2019, 5:07 p.m.