September 2018
Beginner
206 pages
4h 27m
English
The numeric data class includes all numbers except integers, which are their own separate class in R. Anything of class numeric will be of type double, unless it is explicitly declared as an integer. To create an integer, you must type a capital letter, L, after a whole number.
Let's now create and check the class() and typeof() of different numeric objects in R. Follow the steps given below:
x <- 12.7y <- 8Lz <- 950
class(x)typeof(x)class(y)typeof(y)class(z)typeof(z)
Output: The preceding code provides the following output:
Read now
Unlock full access