Example data frame
date name speed acceleration
1/1/17 bob 5 NA
1/1/15 george 5 NA
1/1/15 bob NA 4
1/1/17 bob 4 NA
I want to condense all rows with the same name into one row and keep the newest non-na value for the speed and acceleration column.
Desired output
date name speed acceleration
1/1/17 bob 5 4
1/1/15 george 5 NA