footer_y2 | R Documentation |
Pipe in the dataset (responses) and specify variables. Save out the nicely formatted string to an object to pass to the footer of an ms chart.
footer_y2(
dataset,
...,
q_type = "NULL",
label_length = 100,
prompt_rm = TRUE,
after_symbol = "Select all that apply"
)
dataset |
Haven labelled dataset from which to pull the variable(s) |
... |
Unquoted variables |
q_type |
DEFAULT = 'NULL'; When 'NULL', footer_y2() will automatically choose the variable type when standard Y2 naming conventions are used. When variables have non-standard names, accepts list of any of c('s', 'm', 'oe', 'r', 'sl', 'md', 'n') used to specify question type. s = single select, m = multiple select, etc. |
label_length |
DEFAULT = 100; Truncates question labels to specified length and adds a '...' where truncation has occurred. |
prompt_rm |
DEFAULT TRUE; Attempts to better format the question by removing hard returns, white space, and anything after " - " or the input of the "after_symbol" argument. TRUE is needed in order to identify common stems. |
after_symbol |
DEFAULT = 'Select all that apply'; Removes all question text after and including the provided symbol. Must match upper/lower case of question wording. |
## Not run:
responses %>%
footer_y2(
s_income
)
mtcars %>%
footer_y2(
m_aware,
prompt_rm = TRUE
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.