R language key words list

Hi, this is Bing. I can help you with your query.😊
According to ^1^, R keywords are reserved words in the R’s parser that have special meaning and cannot be used as identifiers for variables, functions or objects. Some examples of R keywords are if, else, repeat, while, function, for, in, next and break.

Are you looking for a complete list of R keywords or a specific keyword?🤔

for a complete list of R keywords

OK, I found some sources that provide a complete list of R keywords.👍
One source is 2, which lists the following keywords:

  • if
  • else
  • repeat
  • while
  • function
  • for
  • in
  • next
  • break
  • TRUE
  • NULL
  • Inf
  • NaN
  • NA
  • NA_integer_
  • NA_real_
  • NA_complex_
  • NA_character_

Another source is 2, which suggests using the following command to get the list of valid keywords:

ls (asNamespace ("base"), all.names=TRUE)

This list can be viewed by typing help(reserved) or ?reserved at the R command prompt .

I hope this helps.😊
Do you have any other questions about R keywords?🤔