dcpo_setup: Prepare Data for DCPO

View source: R/dcpo_setup.R

dcpo_setupR Documentation

Prepare Data for DCPO

Description

dcpo_setup prepares survey data for use with the dcpo function.

dcpo_setup prepares survey data for use with the dcpo function.

Usage

dcpo_setup(
  vars,
  datapath = "../data/dcpo_surveys",
  file = "",
  chime = TRUE,
  survey_additions = NULL,
  ...
)

dcpo_setup(
  vars,
  datapath = "../data/dcpo_surveys",
  file = "",
  chime = TRUE,
  survey_additions = NULL,
  ...
)

Arguments

vars

a data frame (or, optionally, a .csv file) of survey items

datapath

path to the directory that houses raw survey datasets

file

a file path to save output to (usually a .csv or .rds, but any format supported by rio::export)

chime

play chime when complete?

survey_additions

a data frame (or, optionally, a .csv file) of information on surveys not currently included in surveys_data

...

additional arguments

Details

dcpo_setup, when passed a data frame of survey items, collects the responses and formats them for use with the dcpo function.

dcpo_setup, when passed a data frame of survey items, collects the responses and formats them for use with the dcpo function.

Value

a data frame or list of data frames

a data frame or list of data frames


fsolt/DCPOtools documentation built on June 9, 2025, 4:10 p.m.