## rename
dplyr::rename(ir_sample_data, hol = "holocellulose")
dplyr::rename(ir_sample_data, spec = "spectra") # drops ir class
## rename_with
dplyr::rename_with(ir_sample_data, .cols = dplyr::starts_with("id_"),
toupper)
dplyr::rename_with(ir_sample_data, toupper) # drops ir class
Run the code above in your browser using DataLab