In R language /Tool. Find the sum of first 'N' whole numbers by using conditions? : Could you please write a code in R language for the following

**Find the sum of first 20 whole number** by using while/for or IF conditions. 

Also suggest me the alternatives. so that I can learn different ways of writing a code. 

Thank You.