tk3369 / SASLib.jl

Julia library for reading SAS7BDAT data sets
Other
34 stars 7 forks source link

Option to convert NaN to Missing #43

Open tk3369 opened 6 years ago

tk3369 commented 6 years ago

SAS7BDAT stores all numbers as floating point values. When a value is missing, it stores the number as NaN. Technically, NaN and missing data are different things but in this scenario is more likely the number is missing than a true NaN.

This enhancement request is to treat NaN as missing value when reading the file. The column type effectively changes from vector of Float64 to vector of Union{Missing, Float64}. Such behavior may be requested by the user using a new keyword argument nan_as_missing. Further, this option may be used in conjunction with the column_types argument given that some types e.g. Int do not support NaN.

Ref comments from #32 and #42