powered by
Inverse function of make.names. You can use make.names to make colnames legal for subsequent processing and analysis in R. Then use this function to switch back for publication.
make.names
unmake_names(x, ori_names)
A vector of original names.
A vector of names generated by base::make.names().
base::make.names()
The function will try to match the names in x with the names in ori_names. If the names in x are not in ori_names, the function will return NA.
x
ori_names
NA
ori_names <- c("xx (mg/dl)", "b*x", "Covid-19") x <- c(make.names(ori_names), "aa") unmake_names(x, ori_names)
Run the code above in your browser using DataLab