create_user_data: Create User Content Data

Description Usage Arguments Value Examples

View source: R/create_user_data.R

Description

This function takes a copy of the full BES Internet Panel and returns a new data set indexed by respondent id that includes only a subset of variables.

Usage

1
2
3
4
5
6
7
8
create_user_data(
  data = NULL,
  vars = NULL,
  save = T,
  path = NULL,
  fuzzy = T,
  wave = NULL
)

Arguments

data

Data from the BES Internet Panel, 2014-2023

vars

A vector of character strings corresponding to the variable names for the given user content.

save

Whether to save the data to the disk. Takes the values TRUE or FALSE.

path

A file path as a character string specifying where to save the data if save == T.

fuzzy

If true, the function uses partial string matching. If false, it requires the complete string.

wave

A character vector corresponding to the wave that the data come from (e.g. "W19").

Value

Depending on the input file_type, either a data frame or tibble of data.

Examples

1
2
3
dta <-
  read_spss("BES2019_W19_Panel_v0.2.sav") %>%
  create_user_data(vars = c("user1", "user2"))

jackobailey/BESTools documentation built on April 22, 2020, 2:29 p.m.