Tools to Work with Survey Data

Data obtained from surveys contains information not only about the survey responses, but also the survey metadata, e.g. the original survey questions and the answer options. The 'surveydata' package makes it easy to keep track of this metadata, and to easily extract columns with specific questions.


surveydata 0.2.3 (2019-01-19)


  • No new functionality
  • Internal changes to comply with dplyr_0.1.2
  • Documentation improvements, including spell check and improved pkgdown

surveydata 0.2.2 (2018-12-06)

New functionality:

  • Add print_opentext()

Other changes:

  • Fix some package Imports: problems.

surveydata 0.2.1 (2018-01-17)

Breaking changes:

  • Most of the functions now have snake_case names that are more descriptive, e.g. qText() is now question_text().
  • The question_text() function now returns all text if the question number is empty.

New functionality:

  • New set of plotting functions

Other changes:

  • Package documentation built with pkgdown

surveydata 0.2.0 (2017-07-19)


  • Supports dplyr verbs, including mutate(), filter(), arrange() and select()
  • Updated vignette

surveydata 0.1-14 (2013-10-25)


  • Added to .Rbuildignore to comply with CRAN

surveydata 0.1-12 (2013-01-05)


  • When drop=TRUE, [.surveydata simplifies the results and returns a vector, similar to [.data.frame

surveydata 0.1-10 (2012-12-27)


  • Removed XLConnect functions for survey translation, and included in separate surveytranslate package.
  • Added vignette.
  • First submission to CRAN.

surveydata 0.1-09 (2012-12-27)


  • No functional changes.
  • Complete overhaul and review of documentation, to get package ready for first release to CRAN.

surveydata 0.1-08 (17/8/2012)


  • Added writeQuestionExcel() and readQuestionExcel() for exporting and importing questions for easy translation or recoding.
  • Added dropout() to calculate where respondents drop out from survey.

surveydata 0.1-07 (13/7/2012)


  • Bug fixes in [.surveydata
  • Added warning in as.surveydata() if names and varlabel names don't match.

surveydata 0.1-06 (9/7/2012)


  • Added method for [<-.surveydata

surveydata 0.1-05 (29/6/2012)


  • Documentation improvements and small issue fixes.
  • [.surveydata now uses drop=FALSE by default.

surveydata 0.1-04 (13/5/2012)

New features:

  • Modified pattern search to have sep and exclude, rather than a regex (as.surveydata, which.q. etc.).
  • Merged surveyortools package: encoding and cleandata.

surveydata 0.1-03 (31/10/2011)

New features:

  • Now imports packages rather than declaring dependencies..

surveydata 0.1-00

New features:

  • First alpha release.
  • varlabels and varlabels<- to read and modify variable.labels attribute.
  • pattern and pattern<- to set regex pattern that defines unique questions.
  • qText returns question text using regex patterns.
  • extracts subsets with regex patterns using, for example surveydata[, "Q1"].

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


0.2.3 by Andrie de Vries, 10 months ago

Report a bug at

Browse source code at

Authors: Andrie de Vries [aut, cre, cph]

Documentation:   PDF Manual  

Task views: Official Statistics & Survey Methodology

GPL-2 | GPL-3 license

Imports stringr, plyr, dplyr, rlang, magrittr, purrr, ggplot2, scales, tidyr, DT, assertthat

Suggests testthat, knitr, rmarkdown, withr, covr, rprojroot

See at CRAN