Given a data frame such as the following, how do I get a rank order (e.g. integer column ranking the value in order from descending as "1,2,3") column output for every single column without writing out ever single column?
df <- data.frame(
col1 = rnorm(100),
col2 = rnorm(100),
col3 = rnorm(100),
col4 = rnorm(100))
rank_col1 rank_col2 rank_col3 etc...