% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/methods-conversion.R
\name{from_tbl_svy}
\alias{from_tbl_svy}
\title{Convert an srvyr tbl_svy to a surveycore Design Object}
\usage{
from_tbl_svy(x)
}
\arguments{
\item{x}{A \code{srvyr::tbl_svy} object.}
}
\value{
A \code{survey_taylor}, \code{survey_replicate}, or \code{survey_twophase} object.
}
\description{
Converts an \code{srvyr} \code{tbl_svy} to a surveycore design object by delegating
to \code{\link[=from_svydesign]{from_svydesign()}}. A \code{tbl_svy} IS a \code{survey.design}, so the conversion
is structurally identical. Requires both \code{survey} and \code{srvyr}.
}
\examples{
if (requireNamespace("survey", quietly = TRUE) &&
    requireNamespace("srvyr",  quietly = TRUE)) {
  ts <- srvyr::as_survey(
    survey::svydesign(ids = ~sdmvpsu, weights = ~wtint2yr,
      strata = ~sdmvstra, data = nhanes_2017, nest = TRUE)
  )
  d <- from_tbl_svy(ts)
}

}
\seealso{
\code{\link[=as_tbl_svy]{as_tbl_svy()}} to convert in the other direction

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