while statement in R language