sum_3d_scale: Sum a 3d matrix along one axis

View source: R/helper_core.R

sum_3d_scaleR Documentation

Sum a 3d matrix along one axis

Description

For a 3d matrix M with dimension n*k*k, sum over dimension (2,3) with scale c, at entries selected by index in dimension 1

Usage

sum_3d_scale(M, v, index = NULL)

Arguments

M

A 3d matrix with dimension n*k*k

v

A vector of length n

index

a subset of {1,2,...,n}

Value

A k*k matrix


udellgroup/mixedgcImp documentation built on Jan. 25, 2023, 7:55 p.m.