mirror of
https://github.com/agdamsbo/FreesearchR.git
synced 2026-06-19 12:37:30 +02:00
feat: change to custom function for modifying factors
This commit is contained in:
parent
d0d4e950d1
commit
987069dd90
5 changed files with 188 additions and 14 deletions
25
man/unique_names.Rd
Normal file
25
man/unique_names.Rd
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/update-factor-ext.R
|
||||
\name{unique_names}
|
||||
\alias{unique_names}
|
||||
\title{Make unique variable names}
|
||||
\usage{
|
||||
unique_names(new, existing = character())
|
||||
}
|
||||
\arguments{
|
||||
\item{new}{a vector of proposed new variable names}
|
||||
|
||||
\item{existing}{a vector of existing variable names}
|
||||
}
|
||||
\value{
|
||||
a vector of unique new variable names
|
||||
}
|
||||
\description{
|
||||
Helper function to create new variable names that are unique
|
||||
given a set of existing names (in a data set, for example).
|
||||
If a variable name already exists, a number will be appended.
|
||||
}
|
||||
\examples{
|
||||
unique_names(c("var_x", "var_y", "var_x"), c("var_x", "var_z"))
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue