More elementary solution could be
cbind(df[,1:8], pmax(df[,9], df[,10], df[,11]))
where df is your data frame.
3
solved print first 8 columns and one of the last three non-zero columns linux/awk/sed/R [closed]
More elementary solution could be
cbind(df[,1:8], pmax(df[,9], df[,10], df[,11]))
where df is your data frame.
3
solved print first 8 columns and one of the last three non-zero columns linux/awk/sed/R [closed]