column_picker: Select elements from a matrix based on a vector of column...

Description Usage Arguments Details

View source: R/RcppExports.R

Description

From a matrix and a vector, return a vector where the ith element is the matrix element (i, v[i])

Usage

1

Arguments

M

The n by m matrix

v

The length-n vector taking integer values 1 to m

Details

Faster version of M[cbind(1:length(v), v)]


lcomm/ltools documentation built on May 20, 2019, 11:28 p.m.