% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{survey_data}
\alias{survey_data}
\title{Access the Data Component of a Survey Design Object}
\usage{
survey_data(x)
}
\arguments{
\item{x}{A \code{survey_taylor}, \code{survey_replicate}, or \code{survey_twophase} object.}
}
\value{
A \code{data.frame} with all variables, including design variables.
}
\description{
Returns the underlying data frame stored in a survey design object.
This is a thin accessor for \code{x@data} that provides a stable public name
independent of the S7 property structure.
}
\examples{
d <- as_survey(nhanes_2017, ids = sdmvpsu, weights = wtint2yr,
               strata = sdmvstra, nest = TRUE)
head(survey_data(d))
}
\seealso{
Other constructors: 
\code{\link{as_survey}()},
\code{\link{as_survey_nonprob}()},
\code{\link{as_survey_replicate}()},
\code{\link{as_survey_twophase}()},
\code{\link{survey_glm}()},
\code{\link{survey_glm_fit}()},
\code{\link{survey_nonprob}()},
\code{\link{survey_replicate}()},
\code{\link{survey_taylor}()},
\code{\link{survey_twophase}()}
}
\concept{constructors}
