logicalToBinary: encode TRUE as 1, and FALSE as 0 (integers)
Description
when saving data as text files for distribution, printing large
amounts of text containing TRUE and FALSE is inefficient. Convert to binary
takes more R memory, but allows more compact output