Whenever I try to replace column names using the below codes, I get an error.
colnames(all_lab_drug)<- str_replace_all(colnames(all_lab_drug),' |-','_')
Error
Error in str_replace_all(colnames(all_lab_drug), " |-", "_"):
could not find function "str_replace_all"