Additionally to janitor::clean_names() or janitor::make_clean_names() there is also the underlying snakecase package, which should definitely be worth to look at.
If you want the specific formatting like suggested in the first post, you could go for i.e.:
library(tibble)
library(magrittr)
library(snakecase)
df <- tibble(`Homework 1 (167963)` = "abc")
names(df) %>% to_parsed_case(sep_in = NULL, numerals = "tight")
#> [1] "Homework1(167963)"
Created on 2018-10-30 by the reprex package (v0.2.0).