# \donttest{
if (requireNamespace("haven", quietly = TRUE)) {
# Roundtrip: write to a temporary .xpt transport file, read back
tmp <- tempfile(fileext = ".xpt")
write_xpt(survey_data, tmp)
data <- read_xpt(tmp)
unlink(tmp)
}
# }
Run the code above in your browser using DataLab