renaming to cut function to cut_var to distinct from the base-version - UI improvements - nice code formatting.

This commit is contained in:
Andreas Gammelgaard Damsbo 2025-04-11 13:23:18 +02:00
commit 361296531e
No known key found for this signature in database
30 changed files with 1248 additions and 1686 deletions

29
man/set_column_label.Rd Normal file
View file

@ -0,0 +1,29 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/helpers.R
\name{set_column_label}
\alias{set_column_label}
\title{(Re)label columns in data.frame}
\usage{
set_column_label(data, label, overwrite = TRUE)
}
\arguments{
\item{data}{data.frame to be labelled}
\item{label}{named list or vector}
}
\value{
data.frame
}
\description{
(Re)label columns in data.frame
}
\examples{
ls <- list("mpg" = "", "cyl" = "Cylinders", "disp" = "", "hp" = "", "drat" = "", "wt" = "", "qsec" = "", "vs" = "", "am" = "", "gear" = "", "carb" = "")
ls2 <- c("mpg" = "", "cyl" = "Cylinders", "disp" = "", "hp" = "Horses", "drat" = "", "wt" = "", "qsec" = "", "vs" = "", "am" = "", "gear" = "", "carb" = "")
ls3 <- c("mpg" = "", "cyl" = "", "disp" = "", "hp" = "Horses", "drat" = "", "wt" = "", "qsec" = "", "vs" = "", "am" = "", "gear" = "", "carb" = "")
mtcars |>
set_column_label(ls) |>
set_column_label(ls2) |>
set_column_label(ls3)
rlang::expr(FreesearchR::set_column_label(label = !!ls3)) |> expression_string()
}