Skip to contents

This function cleans a data frame by removing empty rows and columns, converting column names to snake_case, and replacing a specified value with NA.

Usage

strg_col_clean(df, na_marker = "")

Arguments

df

A data frame to clean.

na_marker

A value that should be replaced with NA.

Value

The cleaned data frame.

Examples

if (FALSE) { # \dontrun{
df <- data.frame(A = c(1, NA, 3), B = c("apple", "orange", ""), C = c("", "banana", ""))
strg_col_clean(df, "")

} # }