mirror of
https://github.com/agdamsbo/FreesearchR.git
synced 2026-06-21 13:29:06 +02:00
fix: keeps labels modifying factors and creates new factors correctly
This commit is contained in:
parent
fe1609b4f6
commit
32f299880d
23 changed files with 676 additions and 80 deletions
20
man/restore_labels.Rd
Normal file
20
man/restore_labels.Rd
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/utils-labels.R
|
||||
\name{restore_labels}
|
||||
\alias{restore_labels}
|
||||
\title{Restore column labels using a reference data frame}
|
||||
\usage{
|
||||
restore_labels(df_modified, df_reference)
|
||||
}
|
||||
\arguments{
|
||||
\item{df_modified}{A data frame whose columns should receive labels.}
|
||||
|
||||
\item{df_reference}{A data frame carrying the authoritative \code{"label"} attributes.}
|
||||
}
|
||||
\value{
|
||||
\code{df_modified} with labels restored on all columns present in \code{df_reference}.
|
||||
}
|
||||
\description{
|
||||
Convenience wrapper around \code{\link[=extract_labels]{extract_labels()}} + \code{\link[=apply_labels]{apply_labels()}}. Labels are
|
||||
matched by column name; new columns in \code{df_modified} are left unchanged.
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue