I've updated the .gitignore to ignore PNG files. This is because the charts are saved as PNGs and we don't want any of the output hosted on here before publication (or at all).
create_trends.R
This has not changed as much as it looks. It's mostly just formatting because we had updated the file at the same time (you had included all the package names in the function calls) and we had a merge conflict. So I manually added the function names into my version of the code so most of the differences are just spacing issues. If memory serves the material difference comes from variables included in the output (quarter_full and quarter_short).
funnel_text.R
This is a function which generates the sentence for the main points page of the publication report. The smr_data output is passed to the function and it quantifies how many hospitals are above ~3 standard errors from Scotland and then automates the sentence depending on whether it's 0, 1 or 2+.
yr.R
Takes the end date for data extraction returns the year as a text object. E.g. with an end date of 31122018, the year would be January 2018 to December 2018.
create_smr_data.R
Deleting the library calls as all packages are loaded in the environment file.
create_trends_data.R
As above.
The rest is the markdown stuff. There's not really any need to check the text as that is subject to change and probably will change a lot before publication (I've already got comments/rewrites), so I would just check the code chunks and that the document knits OK for others.
And just to note that the documentation for yr.R and funnel_text.R is taken from qtr.R as a placeholder only. Will add documentation/testing in a separate branch later.
So this is not as bad as it looks, I promise.
I've updated the .gitignore to ignore PNG files. This is because the charts are saved as PNGs and we don't want any of the output hosted on here before publication (or at all).
create_trends.R This has not changed as much as it looks. It's mostly just formatting because we had updated the file at the same time (you had included all the package names in the function calls) and we had a merge conflict. So I manually added the function names into my version of the code so most of the differences are just spacing issues. If memory serves the material difference comes from variables included in the output (quarter_full and quarter_short).
funnel_text.R This is a function which generates the sentence for the main points page of the publication report. The smr_data output is passed to the function and it quantifies how many hospitals are above ~3 standard errors from Scotland and then automates the sentence depending on whether it's 0, 1 or 2+.
yr.R Takes the end date for data extraction returns the year as a text object. E.g. with an end date of 31122018, the year would be January 2018 to December 2018.
create_smr_data.R Deleting the library calls as all packages are loaded in the environment file.
create_trends_data.R As above.
The rest is the markdown stuff. There's not really any need to check the text as that is subject to change and probably will change a lot before publication (I've already got comments/rewrites), so I would just check the code chunks and that the document knits OK for others.