copy_names: Copy names from one object to another.

copy_namesR Documentation

Copy names from one object to another.

Description

Attempts to copy names that fit the dimensions of vectors, lists, matrices and data.frames.

Usage

copy_names(x, y, partialmatching = T)

Arguments

x

(an object) An object whose dimnames should be copied.

y

(an object) An object whose dimensions that should be renamed.

Examples

m = matrix(1:9, nrow=3)
n = m
rownames(m) = letters[1:3]
colnames(m) = LETTERS[1:3]
copy_names(m, n)
n

Deleetdk/kirkegaard documentation built on April 22, 2024, 5:22 p.m.