From fdf3550ac9e8ef0aed4fe642e6046fec7e0f1ad7 Mon Sep 17 00:00:00 2001 From: Scott Page Date: Thu, 20 Oct 2016 14:47:08 -0500 Subject: [PATCH] support fields --- R/respondentlist.r | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/R/respondentlist.r b/R/respondentlist.r index ffe42bd..adbd6f6 100644 --- a/R/respondentlist.r +++ b/R/respondentlist.r @@ -66,7 +66,9 @@ respondentlist <- function( return(content) } else { out <- lapply(content$data$respondents, function(x) { - structure(list(respondent_id = x$respondent_id, survey_id = survey), class = "sm_respondent") + response <- list(respondent_id = x$respondent_id, survey_id = survey) + + structure(append(response, x[fields]), class = "sm_respondent") }) return(out) }