R – Reserved Keywords

All Computer Programming Language follow the same definition of a reserved word. A reserved word is a word that cannot be used as an identifier, such as the name of a variable, function or label – it is “reserved from use”. R Programming Language also have its list of reserved words.

If Else Repeat While Function
For In Next Break True
False Null InF NaN NA
NA_Integer NA_real_ NA_complex_ NA_character_

 

  • If, else, repeat, while, function, for, in next, break – used for Loops, conditions and user defined functions
  • TRUE, FALSE – used as logical constants
  • NULL – used for undefined values
  • InF – used for Infinity
  • NaN – used for Not a Number
  • NA – used for Not Available values

To view the list of reserved words in R, in R Console command prompt type

  • > ?Reserved
  • Help(reserved)

Both command will redirect you to the manual pages of documentation