What is the opposite function of max.col
(R language).
I couldn't find min.col
or relevant info in the manual:
https://stat.ethz.ch/R-manual/R-devel/library/base/html/maxCol.html
I'm trying to generate an opposite function of this:
cols = which(names(df) %in% c( "avp", "USD.KRW","cd"));
df$max_col = names(df)[cols][max.col(df[cols])]