Closed ahjames11 closed 2 years ago
When reading, missing fields are added to each table. This is fine, but some fields are optional and this feature bloats the object unnessarily.
The primary offender are the Tag1 - Tag25 fields in ActualCostHourData, but there may be others.
Proposed solution is to add to the file spec an is_optional field. Then, if the field is_optional == TRUE and is all NA, drop it.
is_optional
is_optional == TRUE
NA
Added in drop_na_optional_spec_tables() function. This probably should be in another package. This will trigger at the end of read_flexfile() and the as_*() functions.
drop_na_optional_spec_tables()
read_flexfile()
as_*()
When reading, missing fields are added to each table. This is fine, but some fields are optional and this feature bloats the object unnessarily.
The primary offender are the Tag1 - Tag25 fields in ActualCostHourData, but there may be others.
Proposed solution is to add to the file spec an
is_optional
field. Then, if the fieldis_optional == TRUE
and is allNA
, drop it.