Reserved words | Reserved words - r - learn r - r programming
- Reserved words in R programming are a set of words that have special meaning and cannot be used as an identifier (variable name, function name etc.).
- Here is a list of reserved words in the R's parser.
Read Also
Keywords in CReserved words in R
if | else | repeat | while | function |
for | in | next | break | TRUE |
FALSE | NULL | Inf | NaN | NA |
NA_integer_ | NA_real_ | NA_complex_ | NA_character_ | ... |
- This list can be viewed by typing
help(reserved)
or?reserved
at the R command prompt as follows.
- A logical constant in R, which can be used a variable.
- Among these words,
if
,else
,repeat
,while
,function
,for
,in
,next
andbreak
are used for conditions, loops and user defined functions. - They form the basic building blocks of programming in R.
TRUE
andFALSE
are the logical constants in R.NULL
represents the absence of a value or an undefined value.Inf
is for "Infinity", for example when 1 is divided by 0.-
NaN
is for "Not a Number", for example when 0 is divided by 0. NA
stands for "Not Available" and is used to represent missing values.R
is a case sensitive language Which mean that TRUE and True are not the same.