labelled (version 1.1.0)

copy_labels: Copy variable and value labels

Description

This function copies variable and value labels (including missing values) from one vector to another or from one data frame to another data frame. For data frame, labels are copied according to variable names, and only if variables are the same type in both data frames.

Usage

copy_labels(from, to)

Arguments

from

Object to copy labels from.

to

Object to copu labels to.

Details

Some base R functions like subset drop variable and value labels attached to a variable. copy_labels coud be used to restore these attributes.