a=c(1,4,5,7,3,3,NA)
b=c(2,7,3,NA,2,5,2)
d=c(2,7,5,NA,9,0,1)
dat=data.frame(a,b,d)
How to pick the max one out of each colomn and the NA are neglected? Finally the result is a vector which concludes 7,7 and 9.What is the code to obtain such a result?