Kevin-Jin / mmap

Forked from https://r-forge.r-project.org/scm/?group_id=648
1 stars 1 forks source link

Support logical values #1

Closed Kevin-Jin closed 7 years ago

Kevin-Jin commented 7 years ago

It appears that some code to handle the LGLSXP case has already been written in mmap.c in the mmap_extract() and mmap_replace() functions. The LGLSXP subcase appears to be missing in the data.frame case, however. in both functions.

To start, only implement as.mmap.logical() for the C_logi8 mode rather than the C_bits mode because figuring out how to encode NA in the C_bits mode requires a bit more creativity. With C_logi8, we can simply encode FALSE as 0, TRUE as 1, and NA as 255.