duplicates | R Documentation |
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.
duplicates(mat)
mat |
A matrix or matrix-like object such as a data.frame or data.table. |
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.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.