R Reserved Words
In this article, you will learn about reserved words; a set of words which have special meaning.
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.
This list can be viewed by typing
?reserved at the R command prompt as follows.
Among these words,
break are used for conditions, loops and user defined functions.
They form the basic building blocks of programming in R.
FALSE 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 whereas
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 are not the same.
While the first one is a reserved word denoting a logical constant in R, the latter can be used a variable name.
> TRUE <- 1 Error in TRUE <- 1 : invalid (do_set) left-hand side to assignment > True <- 1 > TRUE  TRUE > True  1