Numbers in R can be divided into 3 different categories:
Numeric: It represents both whole and floating-point numbers. For example, 123, 32.43, etc.
Integer: It represents only whole numbers and is denoted by L. For example, 23L, 39L, etc.
Compl…