Statistics files without the statistics package
Intact CSV Editor opens the files statistics software writes, and writes them too, so a dataset can be checked, cleaned and passed on without a licence for the package that made it.
| Format | Opens | Writes |
|---|---|---|
SPSS .sav | Yes | Yes — with the full column names beside the short ones |
Stata .dta | Yes | Yes — release 118, which Stata 14 and later read, and which holds UTF-8 |
SAS transport .xpt | Yes | Yes — in the 80-byte records SAS moves between machines |
SAS dataset .sas7bdat | Yes — compressed ones too, and files from mainframes and Unix | — |
R data .rds | Yes | Yes — a data frame R reads with readRDS |
MATLAB .mat | Yes | Yes — a struct with a field per column, level 5 |
HDF5 .h5 | Yes | Yes — a dataset per column, which every HDF5 tool reads |
NetCDF .nc | Yes — all three classic versions, and NetCDF-4 | — |
What a survey file says, not only its numbers
A .sav or a .dta holds more than a grid. Its value labels are read, so where the
file says 1 means Yes, the cell says Yes. The kinds of missing value are kept apart — Refused is an answer,
and a survey with the refusals blanked out is a different survey. Dates count from each format's own day in its own
unit, and a long SPSS string that the file spreads over several columns is one column again.
Saving writes a copy rather than over the file, because a table written over a survey file would throw away the labels it holds.
Measurements in NetCDF
The format weather, water and instrument data arrives in. The variables that run along one dimension become the
table — a time dimension with a column for each thing measured — and a time is the moment its units name, so
days since 1970-01-01 comes out as a date. What the file declares missing is a gap, not the number
standing in for it.
Then do what the data needs
Once open, a dataset is a table like any other: filter it, sort by several columns, summarise it with subtotals, count every column with Statistics — median, variance, quintiles — or join it to another file in SQL. Export it to CSV or Excel for a colleague, or to another package's format.