Description Usage Arguments Details Value Examples
View source: R/respondent_table.R
Create a table with one row for each respondent.
1 2 | respondent_table(df, respondent_characteristic_fields, survey_id = NULL,
respondent_id_field = NULL, survey_year_field = NULL)
|
df |
The survey data frame. It should be labelled data. |
respondent_characteristic_fields |
A list of field names that represent characteristics of the respondent. These are fields that you wish to include in the respondent table. |
survey_id |
A string representing the name of the survey. (e.g. "CGPSS") |
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. |
Extract respondent data from the survey file. Then we make sure there is enough information to uniquely identify each respondent.
A tibble containing the characteristics of each respondent of the survey. Each respondent will be uniquely identified by the ID of the survey, the year of the survey and the respondent identifier.
1 2 3 4 5 | respondent_table(cgpss,
c('LANGUAGE', 'UNIV', 'PROGRAM_NAME', 'CIP'),
survey_id = 'CGPSS',
respondent_id_field = UNIV_RecordNum,
survey_year_field = SURVEY_YEAR)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.