dplyr 0.4.3
To divide all columns by their mean, you could do:
dplyr::mutate_each(dt, funs(. / mean(.)))
Or to specify column positions:
dplyr::mutate_each(dt, funs(. / mean(.)), 5:10)
Or column names:
dplyr::mutate_each_(dt, funs(. / mean(.)), colnames(dt)[5:10])
dplyr 0.4.3.9000
If you only want to divide numeric columns, the devel version of dplyr has mutate_if which operates on columns for which a predicate returns TRUE
dplyr::mutate_if(dt, is.numeric, funs(. / mean(.)))