R TutorialLesson 8Free preview
R Numbers
This lesson is part of R · All levels
Summary
This lesson deals with three types of numbers in R: numeric, integer, and complex. R provides a conversion function between numeric types such as as.numeric() and as.integer(). Developers will understand how R handles specific values such as Inf (not up) and NaN (Not a Number).
Key points
- Numeric is a 64-bit decimal type of floating point of double precision (double)
- The integer saves memory for the count data and ends with the letter 'L'
- Complex handles imaginary numbers with the notation 'number + number*i'
- The functions 'as.numeric() ', 'as.integer() ', and 'is.numeric() ' facilitate type conversion and checking
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.