The surveydata package exposes functionality to support some of the dplyr verbs, e.g. dplyr::filter(). The computation is performed by dplyr, and the resulting object is of class surveydata (as well as the dplyr result).
surveydata
dplyr
dplyr::filter()
# S3 method for surveydata mutate(.data, ...)# S3 method for surveydata as.tbl(.data, ...)# S3 method for surveydata select(.data, ...)# S3 method for surveydata filter(.data, ...)# S3 method for surveydata arrange(.data, ...)# S3 method for surveydata summarise(.data, ...)# S3 method for surveydata summarize(.data, ...)# S3 method for surveydata slice(.data, ...)
# S3 method for surveydata as.tbl(.data, ...)
# S3 method for surveydata select(.data, ...)
# S3 method for surveydata filter(.data, ...)
# S3 method for surveydata arrange(.data, ...)
# S3 method for surveydata summarise(.data, ...)
# S3 method for surveydata summarize(.data, ...)
# S3 method for surveydata slice(.data, ...)
surveydata object or tbl passed to dplyr verb
tbl
passed to dplyr verb
# NOT RUN { withr::with_package("dplyr", help = "dplyr", { membersurvey %>% as.tbl() %>% .[c("id", "Q1", "Q2")] %>% filter(Q2 == 2009) }) # }
Run the code above in your browser using DataLab