Reads a CDISC Dataset-JSON v1.1 file and writes it as a SAS V5 transport file. All metadata (labels, lengths) is preserved.
See also
xpt_to_json() for the reverse, write_xpt(), read_json().
Other io:
read_json(),
write_json(),
xpt_to_json()
Examples
dm <- data.frame(STUDYID = "S1", AGE = 65L, stringsAsFactors = FALSE)
json <- tempfile(fileext = ".json")
xpt <- tempfile(fileext = ".xpt")
write_json(dm, json, dataset = "DM", label = "Demographics")
json_to_xpt(json, xpt)
read_xpt(xpt)
#> STUDYID AGE
#> 1 S1 65
unlink(c(json, xpt))
