% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/methods-conversion.R
\name{as_tbl_svy}
\alias{as_tbl_svy}
\title{Convert a surveycore Design Object to an srvyr tbl_svy}
\usage{
as_tbl_svy(x)
}
\arguments{
\item{x}{A \code{survey_taylor}, \code{survey_replicate}, or \code{survey_twophase} object.}
}
\value{
A \code{srvyr::tbl_svy} object.
}
\description{
Converts a surveycore design object to an \code{srvyr} \code{tbl_svy} by first
converting to a \code{survey} design via \code{\link[=as_svydesign]{as_svydesign()}} and then wrapping
with \code{srvyr::as_survey()}. Requires both \code{survey} and \code{srvyr}.
}
\details{
Metadata (variable labels, value labels) is NOT carried over.
}
\examples{
d <- as_survey(nhanes_2017, ids = sdmvpsu, weights = wtint2yr,
               strata = sdmvstra, nest = TRUE)
if (requireNamespace("survey", quietly = TRUE) &&
    requireNamespace("srvyr",  quietly = TRUE)) {
  ts <- as_tbl_svy(d)
}

}
\seealso{
\code{\link[=from_tbl_svy]{from_tbl_svy()}} to convert back from a \code{tbl_svy} object

Other conversion: 
\code{\link{as_svydesign}()},
\code{\link{from_svydesign}()},
\code{\link{from_tbl_svy}()}
}
\concept{conversion}
