set_pair_matrix: Update a matrix with values from a 1d vector using row and...

View source: R/util.R

set_pair_matrixR Documentation

Update a matrix with values from a 1d vector using row and column positions

Description

Update a matrix with values from a 1d vector using row and column positions

Usage

set_pair_matrix(m, rows, cols, vals)

Arguments

m

a matrix object

rows

row positions, either as indices or matches to row names

cols

row positions, either as indices or matches to row names

vals

values to insert at [rows/cols]

Value

a matrix with updated values


AllenInstitute/scrattch.hicat documentation built on June 6, 2024, 5:31 a.m.