Purse your lips and whistle normally by blowing outwards through your pursed lips.
Blow into the whistle with a tight mouth, rather than a more oval-shaped, loose mouth. You should feel a vibration in the front of your lips, and not in your tongue or cheeks. Remember this whistle.
Open your mouth wide and say "ah." Press your tongue against the roof of your mouth so it becomes more of a humming sound.
Close your mouth halfway, narrowing your lips so the "ah" sound becomes an "ooh" sound. Try to make an "ooh" sound from deep in your belly.
Continue making the "ooh" sound while pursing your lips as if you were going to whistle like you did in Step 2. You should feel a vibration and hear a faint whisper of the R2-D2 sound.
Combine the "ooh" sound from above with some extra blown air while pursing your lips in a whistle, and you should have the R2-D2 robotic whistle hum sound.
Vary the tone of your sound to make it sound as if you are asking questions or making statements.