duplicates: Remove the duplicate entries in a matrix-like object

View source: R/duplicates.R

duplicatesR Documentation

Remove the duplicate entries in a matrix-like object

Description

This is a convenient function that removes the duplicated entries (rows) in a matrix, but keeps a map of which of the original indices match the duplicates.

Usage

duplicates(mat)

Arguments

mat

A matrix or matrix-like object such as a data.frame or data.table.

Value

A named list containing a matrix of the unique rows of the matrix and a vector matching the original indices to rows in the unique matrix.


bocinsky/PaleoCAR documentation built on Feb. 23, 2023, 12:14 p.m.