Sanitize text for compatability with latex. Used for example when escape = FALSE needed in kableExtra table (with output latex), for example when needing footnotes.
sanitize_text(str)
Character vector to be sanitized.
The sanitized character vector.
var_names <- c(">50", "#Test", "Test1 & Test2")
var_names <- sanitize_text(var_names)