convert csv to xpt and sas7bdat by sas script file convert_csv2sas.sas which can be run inside sas to make genuine xpt and sas7bdat files generated by sas software

csv2sas(wd = getwd(), xptPath = getwd(), sas7bdatPath = getwd(),
  output = "csv2sas.sas", openfile = FALSE)

Arguments

wd

working directory containing csv files

output

sas file output

openfile

if TRUE, output file will be opened

xpt

directory of xpt files

sas7bdat

directory of sas7bdat files

Value

sas file which can be run inside sas to make genuine xpt and sas7bdat files generated by sas software

Examples

write.csv(Theoph, 'Theoph.csv', row.names = FALSE) write.csv(Indometh, 'Indometh.csv', row.names = FALSE) csv2sas() # Means "Current directory"
#> [1] "Indometh.csv" #> [1] "Theoph.csv" #> [1] "C:/Users/mdlhs/asancpt/puresas/docs/reference/csv2sas.sas was generated."