Converts a single NSQIP .txt or a directory of NSQIP .txt files into a standardized data.table.

nsqip(path, csv = "both", rds = TRUE)

Arguments

path

a relative or absolute path to a file or directory.

csv

a character vector. write the resulting data table to a .csv file. See details for options.

rds

a logical vector. Write the resulting data table to .rds file. Produces individual files for each .txt input.

Details

csv may be set to "indiv", "append", "both", or NA. If "indiv", a CSV file will be output for each input file. If "append", a single CSV file will be created appending all input files into a single output file. "both" will enact the effects of both "indiv" and "append". NA will produce no CSV files.