mirror of
https://github.com/agdamsbo/FreesearchR.git
synced 2026-06-19 04:27:30 +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
21
man/apply_labels.Rd
Normal file
21
man/apply_labels.Rd
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/utils-labels.R
|
||||
\name{apply_labels}
|
||||
\alias{apply_labels}
|
||||
\title{Apply a named label vector to a data frame}
|
||||
\usage{
|
||||
apply_labels(df, labels)
|
||||
}
|
||||
\arguments{
|
||||
\item{df}{A data frame.}
|
||||
|
||||
\item{labels}{A named character vector (names = column names, values = labels).
|
||||
Typically the output of \code{\link[=extract_labels]{extract_labels()}}. Labels for absent columns are
|
||||
silently ignored.}
|
||||
}
|
||||
\value{
|
||||
\code{df} with \code{"label"} attributes set on matching columns.
|
||||
}
|
||||
\description{
|
||||
Apply a named label vector to a data frame
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue