% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/remove_names.R
\name{remove_names}
\alias{remove_names}
\title{Remove Patterns from Column Names or Variables}
\usage{
remove_names(
  input_df,
  variable = "colnames",
  patterns_to_na = patterns_to_na,
  patterns_space = NULL
)
}
\arguments{
\item{input_df}{Data frame. Input data to modify.}

\item{variable}{Character. Column to modify: "colnames" for column names,
or a specific column name. Default is "colnames".}

\item{patterns_to_na}{Character vector. Patterns to replace with empty
string. Default uses [patterns_to_na].}

\item{patterns_space}{Character vector or `NULL`. Patterns to replace with
spaces. Default is `NULL`.}
}
\value{
Modified data frame with patterns replaced.
}
\description{
Modifies column names or specified variables in a data frame by replacing
specified patterns with empty strings or spaces.
}
\examples{
df <- data.frame(
  "CellA_cibersort" = 1:5,
  "CellB_xCell" = 6:10,
  "CellC_TIMER" = 11:15
)
result <- remove_names(df, variable = "colnames", patterns_to_na = patterns_to_na)
colnames(result)
}
\author{
Dongqiang Zeng
}
