Merck / metalite

An R package to create metadata structure for ADaM data analysis and reporting
https://merck.github.io/metalite/
GNU General Public License v3.0
15 stars 5 forks source link

Add utility function for handling missing values in SAS data #158

Open nanxstats opened 7 months ago

nanxstats commented 7 months ago

Our everyday workflow involves converting SAS data to R dataset using haven::read_sas(). However, in most of the cases, there is an additional step to convert SAS missing values for characters to NAs in R. This is not handled by the read_sas() call. It would be great to standardize this flow and reduce frictions by implementing a reusable utility function in metalite.

This issue was discussed in this pharmaverse blog post. Theoretically, it can be handled by introducing admiral as a dependency. However, it currently has a non-trivial number of dependencies that we might want to minimize. So, implementing this in the zero-dependency metalite package could be ideal.

cc @julianschmocker @BrianLang