Writes a data frame to a SAS transport file (.xpt) named like "[domain].xpt"
Arguments
- tbl
a data frame to write
- filename
a string, the SDTM domain or supplemental domain name which will become the file name and the name attribute of the transport file, the .xpt file extension is optional
- dir
a string, the directory to write to, default is
NULL- label
a string, the data set name/label for the
haven::write_xpt()nameargument. The default isNULLin which case thefilenamewill be used.labelmust be 8 characters or less.
Examples
tbl <- dplyr::tibble(one = as.numeric(1:3), two = letters[1:3])
path <- tempdir()
write_tbl_to_xpt(tbl, filename = "test.xpt", dir = path)
