I tried to use dplyr::rename and I get an error:
occ_5d <- dplyr::rename(occ_5d, rowname='code_5d')
Error: Unknown column `code_5d`
Call `rlang::last_error()` to see a backtrace
I instead used the base R function which turns out to be quite simple and effective:
names(occ_5d)[1] = "code_5d"