Build DataFrame with Missing Columns and NA Values
build_missingColumn_with_na.Rd
This function takes a DataFrame and a list of column names and adds missing columns with NA values to the DataFrame.
Usage
build_missingColumn_with_na(
df,
l_columns = c("effect", "component", "group", "term", "estimate", "std.error",
"statistic", "p.value")
)
Arguments
- df
The input DataFrame.
- l_columns
A character vector specifying the column names to be present in the DataFrame.
Examples
df <- data.frame(effect = "fixed", term = "Sepal.Length", estimate = 0.7)
df_with_na <- build_missingColumn_with_na(df)