Created
June 4, 2017 18:24
-
-
Save summerofgeorge/7cbd87cf2f3cc1fafaf870db5dddd18b to your computer and use it in GitHub Desktop.
Special Values in R
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #NA/missing values | |
| a<-NA | |
| b<-5 | |
| #check for NA | |
| is.na(a) | |
| is.na(num2) | |
| num1+num2 | |
| #NaN (Not a number) | |
| a<-0 | |
| b<-0 | |
| a/b | |
| #Inf and -Inf (plus and minus infinity) | |
| a<-5 | |
| b<-0 | |
| a/b | |
| a<-Inf | |
| b<-1 | |
| a+b |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment