mirror of
https://github.com/agdamsbo/FreesearchR.git
synced 2026-06-19 04:27:30 +02:00
21 lines
675 B
R
21 lines
675 B
R
% Generated by roxygen2: do not edit by hand
|
|
% Please edit documentation in R/utils-labels.R
|
|
\name{with_labels}
|
|
\alias{with_labels}
|
|
\title{Evaluate an expression while preserving column labels}
|
|
\usage{
|
|
with_labels(df, expr)
|
|
}
|
|
\arguments{
|
|
\item{df}{A data frame carrying \code{"label"} attributes.}
|
|
|
|
\item{expr}{An unquoted expression that transforms \code{df} and returns a data frame.}
|
|
}
|
|
\value{
|
|
The data frame produced by \code{expr}, with original labels restored.
|
|
}
|
|
\description{
|
|
Snapshots labels from \code{df} before evaluating \code{expr}, then reapplies them to
|
|
matching columns in the result. New columns created inside \code{expr} receive no
|
|
label automatically.
|
|
}
|