Skip to contents

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.

Value

A DataFrame with missing columns added and filled with NA values.

Examples


df <- data.frame(effect = "fixed", term = "Sepal.Length", estimate = 0.7)
df_with_na <- build_missingColumn_with_na(df)