read_sheet_responses: Read survey responses from a Google Sheet

View source: R/google_sheets.R

read_sheet_responsesR Documentation

Read survey responses from a Google Sheet

Description

Reads response data collected by the surveyframe Google Apps Script endpoint and returns a validated data frame ready for the surveyframe analysis pipeline.

Usage

read_sheet_responses(
  sheet_id,
  instrument,
  sheet_name = "Responses",
  respondent_id = "respondent_id",
  submitted_at = "submitted_at",
  meta_cols = NULL
)

Arguments

sheet_id

Character. The Google Sheet ID or full URL.

instrument

An sframe object.

sheet_name

Character. The name of the sheet tab holding responses. Defaults to "Responses".

respondent_id

Character or NULL. Column holding respondent IDs. Defaults to "respondent_id".

submitted_at

Character or NULL. Column holding submission timestamps. Defaults to "submitted_at".

meta_cols

Character vector or NULL. Additional sheet columns to accept as metadata without a warning, for example bridge fields a host application appends to each submission. "started_at" is always included.

Value

A data.frame validated against the instrument, ready for quality_report(), score_scales(), and reliability_report().

See Also

export_google_sheet(), read_responses(), quality_report()

Examples

## Not run: 
responses <- read_sheet_responses(
  sheet_id   = "your-sheet-id",
  instrument = instr
)
qr <- quality_report(responses, instr, respondent_id = "respondent_id")

## End(Not run)

surveyframe documentation built on July 25, 2026, 1:07 a.m.