The package already has a way to convert variables to Factors, but it also needs a way to convert variables to Logical (TRUE/FALSE). It should not be based on making yet another file; it should either be:
A new column in index.tsv that flags a variable to be converted to Logical
A keyword that you can type into the existing factor_file column that overrides the file search and triggers the conversion.
Maybe #2 is better because it also lets me scale into other built-in converters? See #13.
Closed by commit 5c0c7584279cd10b8351b3764bf888f0e6c90162. This was implemented as "converters" that are triggered by using the converter tags:
\ — Converts truthy values to TRUE, falsy values to FALSE, everything else (including NA) to NA.
\ — Converts truthy values to TRUE and everything else to FALSE, but preserves NA as NA.
\ — Converts truthy values to factor level "Yes", falsy values to factor level "No", and everything else (including NA) to NA. "Yes" is the first factor level.
\ — Same as above, but with "No" as the first factor level.
\ — Converts truthy values to factor level "Yes" and everything else to factor level "No", but preserves NA as NA. "Yes" is the first factor level.
\ — Same as above, but with "No" as the first factor level.
The package already has a way to convert variables to Factors, but it also needs a way to convert variables to Logical (
TRUE
/FALSE
). It should not be based on making yet another file; it should either be:index.tsv
that flags a variable to be converted to Logicalfactor_file
column that overrides the file search and triggers the conversion.Maybe #2 is better because it also lets me scale into other built-in converters? See #13.