respondent_table: Respondent Table

Description Usage Arguments Details Value Examples

View source: R/respondent_table.R

Description

Create a table with one row for each respondent.

Usage

1
2
respondent_table(df, respondent_characteristic_fields, survey_id = NULL,
  respondent_id_field = NULL, survey_year_field = NULL)

Arguments

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.

Details

Extract respondent data from the survey file. Then we make sure there is enough information to uniquely identify each respondent.

Value

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.

Examples

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)

sechilds/surveyetl documentation built on June 3, 2020, 5:04 p.m.