Description Usage Arguments Value Examples
Provide microdata and unit codes to generate a report from a template. Designed for use by designated analysts who have access to Civil Service People Survey data for their organisation.
1 | generate_report(microdata, hierarchy, metadata, unit_codes, out_dir)
|
microdata |
A data.frame. Your organisation's microdata file that
contains the responses of each respondent. Received as the file
|
hierarchy |
A data.frame. The lookup file that matches each
respondent to their unit code. Received in the file
|
metadata |
A data.frame. The file that provides additional metadata
about each unit, such as headcount and name. Received in the file
|
unit_codes |
A character vector of organisational unit codes in the
form |
out_dir |
Character. An existing directory to which the output will be written. |
A rendered PDF file in the provided location.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ## Not run:
# Read files
library(readr)
micro_df <- read_csv("~/Documents/CO2019_flat.csv",)
hier_df <- read_csv("~/Documents/CO2019_hierarchy.csv")
meta_df <- read_csv("~/Documents/CO2019_hierarchy_metadata.csv")
# Create a report for the specified unit codes
generate_report(
microdata = micro_df,
hierarchy = hier_df,
metadata = meta_df,
unit_codes = c("CO0027", "CO0205", "CO0384"),
out_dir = "~/Documents/reports"
)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.