How do you know r2 doesn't recognize him. He makes no indication he does or doesn't and can't speak.
I do not like it either that R2D2 and 3CPO have to appear everywhere. (Having not seen Clone wars,) Why does R2 do not recognise Yoda on Dagobah, when they have been through a lot of adventures together?Remember when Yoda said "Wars not make one great!" and he was all wise and told Luke that he didn't need his weapons and was generally above the use of violence as a Jedi?
And then they made him jump around with a laser sword and fly a spaceship with guns.
Luke mostly understands what R2 "says". R2 makes none whatsoever attempt to tell Luke that this is Yoda.
Esp. after Yoda says, "you're searching for, I will bring you there" - at the latest there should R2 mentioned that to Luke (because R2's otherwise not up to pranks).
Then also that R2 and Yoga make a pulling contest for a lamp...
R2-D2 is actually a jerk.
He curses in his cute little droid language constantly.