Newer
Older
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tidy_glmmtmb.R
\name{renameColumns}
\alias{renameColumns}
\title{Rename Columns in a Data Frame}
\usage{
renameColumns(
df,
old_names = c("Estimate", "Std..Error", "z.value", "Pr...z.."),
new_names = c("estimate", "std.error", "statistic", "p.value")
)
}
\arguments{
\item{df}{A data frame.}
\item{old_names}{A character vector containing the old column names to be replaced.}
\item{new_names}{A character vector containing the corresponding new column names.}
}
\value{
The data frame with renamed columns.
}
\description{
This function renames columns in a data frame based on specified old names and corresponding new names.
}
\examples{
df <- data.frame(Estimate = c(1.5, 2.0, 3.2),
Std..Error = c(0.1, 0.3, 0.2),
z.value = c(3.75, 6.67, 4.90),
Pr...z.. = c(0.001, 0.0001, 0.002))
renamed_df <- renameColumns(df, old_names = c("Estimate", "Std..Error", "z.value", "Pr...z.."),
new_names = c("estimate", "std.error", "statistic", "p.value"))
}