deepcopy_sparse_object: Deep copy sparse matrices and vectors

View source: R/utils.R

deepcopy_sparse_objectR Documentation

Deep copy sparse matrices and vectors

Description

Generates a deep copy of a sparse matrix or sparse vector object, which can come useful when the matrix is to later be passed to functions that will potentially modify it in-place, such as sort_sparse_indices.

Usage

deepcopy_sparse_object(X)

Arguments

X

A sparse matrix or sparse vector from the 'Matrix' package.

Value

The same input 'X' with the fields replaced with deep copies.


MatrixExtra documentation built on May 29, 2024, 2:53 a.m.