Skip to content
Prev 275562 / 398506 Next

New column of data filled with the larger value from 2 columns

robgriffin247 <robgriffin247 <at> hotmail.com> writes:
sounds like you want data$C <- pmax(data$A,data$B)
(or data <- transform(C,pmax(A,B)))