Calling Functions in the R Language |

Special Numeric Values |

The R language has four symbols that are used to represent special numerical values.

The symbol

represents a missing value.`NA`The symbol

represents positive infinity.`Inf`The symbol

represents positive infinity.`–Inf`The symbol

represents a "NaN," which is a floating-point value that represents an undefined value such as the result of the division .`NaN`

The SAS language has 28 symbols that are used to represent special numerical values.

The symbol

represents a generic missing value.`.`The symbols

–`.A`and`.Z`are also missing values. Some applications use`._`to represent positive infinity and use`.I`to represent negative infinity.`.M`

The following table shows how special numeric values in R are converted to SAS missing values:

Value in R |
SAS Missing Value |
---|---|

Inf |
.I |

–Inf |
.M |

NA |
. |

NaN |
. |

The following table shows how SAS missing values are converted when data are transferred to R:

SAS Missing Value |
Value in R |
---|---|

.I |
Inf |

.M |
–Inf |

All others |
NA |

Copyright © SAS Institute, Inc. All Rights Reserved.