matrix.concatenate {adelie}R Documentation

Creates a concatenation of the matrices.

Description

Creates a concatenation of the matrices.

Usage

matrix.concatenate(mats, axis = 0, n_threads = 1)

Arguments

mats

List of matrices.

axis

The axis along which the matrices will be joined.

n_threads

Number of threads.

Value

Concatenation of matrices.

Examples

n <- 100
ps <- c(10, 20, 30)
mats <- lapply(ps, function(p) { 
    matrix.dense(matrix(rnorm(n * p), n, p))
})
out <- matrix.concatenate(mats, axis=1)
ns <- c(10, 20, 30)
p <- 100
mats <- lapply(ns, function(n) { 
    matrix.dense(matrix(rnorm(n * p), n, p))
})
out <- matrix.concatenate(mats, axis=0)

[Package adelie version 1.0.1 Index]