pik-piam / quitte

Bits and pieces of code to use with quitte-style data frames
0 stars 10 forks source link

improve+reduce fails+warnings in read+write functions; fix sorting order in quitteSort #84

Closed orichters closed 8 months ago

orichters commented 8 months ago
  1. If somehow an empty data.frame was written to a mif file and then read with read.quitte, the error message was incomprehensible:

    Error in `if (last(period.columns) != length(header)) ...`:
    ! missing value where TRUE/FALSE needed
    Run `rlang::last_trace()` to see where the error occurred.

    Now, fail with

    No column name found that could be understood as a 4-digit year.
  2. let write.mif and write.IAMCxlsx try to convert to quitte instead of failing immediately, and warn in case of empty data

  3. sort order in quitteSort according to function description, was somehow changed unnoticed in this commit