### Install phstemplates from GitHub Source: https://github.com/public-health-scotland/phstemplates/blob/main/README.md Install the package directly from GitHub using the remotes package. Ensure you have the necessary permissions and R tools configured. ```r remotes::install_github("Public-Health-Scotland/phstemplates", ref = "main") ``` -------------------------------- ### Install common dependencies manually Source: https://github.com/public-health-scotland/phstemplates/blob/main/README.md If automatic dependency installation fails, manually install required packages like flextable and officer before installing phstemplates. ```r install.packages(c("flextable", "officer")) ``` -------------------------------- ### Install phstemplates from internal repository Source: https://github.com/public-health-scotland/phstemplates/blob/main/README.md Use this command to install the package if working within the PHS network and R is configured for the internal package manager. ```r install.packages("phstemplates") ``` -------------------------------- ### Render PHS Official Statistics Report Source: https://github.com/public-health-scotland/phstemplates/blob/main/README.md Use this function to render an R Markdown document for PHS official statistics reports. Specify input and output files, and customize the report format with reference documents, cover pages, and table of contents depth. ```r rmarkdown::render( input = "my_report.Rmd", output_format = phstemplates::phs_report_docx( reference_docx = "phs-offstats-report.docx", cover_page = "phs-offstats-cover.docx", cover_title = "My Report Title", cover_subtitle = "My Report Subtitle", cover_date = "01 01 2024", toc_depth = 3 ), output_file = "my_report.docx" ) ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.