Update example.R

remove dependency on `do`