sum_2d_scale: Sum a 2d matrix along one axis

View source: R/helper_core.R

sum_2d_scaleR Documentation

Sum a 2d matrix along one axis

Description

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

Usage

sum_2d_scale(M, v, index = NULL)

Arguments

M

A 2d matrix with dimension n*k

index

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

c

A vector of length n

Value

A k*1 matrix


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