Description Usage Arguments Details Value Examples
View source: R/response_table.R
Create a table with one row for each response.
1 2 | response_table(df, respondent_id_field = NULL,
survey_year_field = NULL, excluded_fields, survey_id = NULL)
|
df |
The survey data frame. It should have variable labels. |
respondent_id_field |
The field in the data frame that uniquely identifies each respondent within that cycle of the survey. |
survey_year_field |
the field in the data frame that identifies the year of the survey. |
excluded_fields |
A list of field names that are not questions and shouldn't be included. |
survey_id |
A string representing the name of the survey. |
Extract the answers/responses from the survey file. Then we create a table where there is one row for each question per respondent – assuming they answered the question.
A tibble containing all the responses of the survey, with the actual response, a character label and a score.
1 2 3 4 5 | response_table(cgpss,
survey_id = 'CGPSS',
respondent_id_field = UNIV_RecordNum,
survey_year_field = SURVEY_YEAR,
excluded_fields = c('LANGUAGE', 'UNIV', 'PROGRAM_NAME', 'CIP'))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.