R/utils-survey.R

Defines functions is_survey as.data.frame.survey.design

# script contains code to assist with survey objects

#' @export
as.data.frame.survey.design <- function(x, ...) {
  x$variables
}

#' Test if data is a survey object
#' @noRd
is_survey <- function(data) {
  return(inherits(data, "survey.design") | inherits(data, "svyrep.design"))
}

Try the gtsummary package in your browser

Any scripts or data that you put into this service are public.

gtsummary documentation built on Oct. 5, 2024, 1:06 a.m.