Describe the bug
In g.report.part5_dictionary, the variable lastHour is not captured by any condition in the definition-building logic, causing what to default to "". For personsummary reports, the aggregation suffix (- plain average or - weighted average) is then appended to an empty string, resulting in a definition that starts with -. When the output CSV is opened in Excel, these cells are interpreted as formulas and display #NAME?.
This issue only affects part5_dictionary_personsummary.csv and does not appear in part5_dictionary_daysummary.csv, as the aggregation suffix (_pla, _wei) is only appended in the personsummary report.
To Reproduce
Run GGIR with any configuration that generates a part5 personsummary report. Open the resulting part5_dictionary_personsummary.csv in Excel and look for rows where Variable is lastHour_pla or lastHour_wei.
Expected behavior
lastHour_pla and lastHour_wei should have a meaningful definition (e.g. "Last hour of the recording - plain average").
Screenshots

Desktop:
- OS: Linux (Docker container)
- GGIR Version [3.3.4]
Cause
In g.report.part5_dictionary.R
|
if ("pla" %in% elements) agg = "- plain average" |
lastHour does not match any what-assignment branch, so the final definition is just the aggregation suffix with no leading content.
Suggested fix
Add lastHour to baseDictionary, or just hardcode lastHour
if ("lastHour" %in% elements) what = "Last hour of the recording"
Additional context
This only affects the readability of the data dictionary CSV and does not impact GGIR's core processing output. However, it may confuse users who use the dictionary for data documentation purposes. Interestingly, this bug seems to have gone unnoticed for a while. I guess perhaps not many of users open the data dictionary CSV directly in Excel lol.
Before submitting
Describe the bug
In g.report.part5_dictionary, the variable lastHour is not captured by any condition in the definition-building logic, causing what to default to "". For personsummary reports, the aggregation suffix (- plain average or - weighted average) is then appended to an empty string, resulting in a definition that starts with -. When the output CSV is opened in Excel, these cells are interpreted as formulas and display #NAME?.
This issue only affects part5_dictionary_personsummary.csv and does not appear in part5_dictionary_daysummary.csv, as the aggregation suffix (_pla, _wei) is only appended in the personsummary report.
To Reproduce
Run GGIR with any configuration that generates a part5 personsummary report. Open the resulting part5_dictionary_personsummary.csv in Excel and look for rows where Variable is lastHour_pla or lastHour_wei.
Expected behavior
lastHour_pla and lastHour_wei should have a meaningful definition (e.g. "Last hour of the recording - plain average").
Screenshots

Desktop:
Cause
In g.report.part5_dictionary.R
GGIR/R/g.report.part5_dictionary.R
Lines 247 to 249 in 7b6699f
GGIR/R/g.report.part5_dictionary.R
Line 258 in 7b6699f
GGIR/R/g.report.part5_dictionary.R
Line 266 in 7b6699f
lastHour does not match any what-assignment branch, so the final definition is just the aggregation suffix with no leading content.
Suggested fix
Add lastHour to baseDictionary, or just hardcode lastHour
if ("lastHour" %in% elements) what = "Last hour of the recording"Additional context
This only affects the readability of the data dictionary CSV and does not impact GGIR's core processing output. However, it may confuse users who use the dictionary for data documentation purposes. Interestingly, this bug seems to have gone unnoticed for a while. I guess perhaps not many of users open the data dictionary CSV directly in Excel lol.
Before submitting
mainbranch from GitHub?