[x] I explained my changes within the PR, particularly in hard-to-understand areas
[x] I am absolutely sure that this file is not touched or checked by the automated model tests, so it is pointless to run them. But I checked that output.R and then selecting this script works as intended.
Purpose of this PR
Type of change
Checklist:
output.R
and then selecting this script works as intended.