General understanding of all values by simply using following code: #reading documentation on all data types: Infinite also tells you that the value is not missing and a number!Īll four null/missing data types have accompanying logical functions available in base R returning the TRUE / FALSE for each of particular function: is.null(), is.na(), is.nan(), is.infinite(). Inf is a reserved word and is – in most cases – product of computations in R language and therefore very rarely a product of data import. Inf and -Inf stands for infinity (or negative infinity) and is a result of storing either a large number or a product that is a result of division by zero. NaN stands for Not A Number and is a logical vector of a length 1 and applies to numerical values, as well as real and imaginary parts of complex values, but not to values of integer vector. NA and “NA” (as presented as string) are not interchangeable. NA is a logical constant of length 1 and is an indicator for a missing value.NA (capital letters) is a reserved word and can be coerced to any other data type vector (except raw) and can also be a product when importing data. In R language, NULL (capital letters) is a reserved word and can also be the product of importing data with unknown data type. NULL is an object and is returned when an expression or function results in an undefined value. R language supports several null-able values and it is relatively important to understand how these values behave, when making data pre-processing and data munging.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |