tidyverse / haven

Read SPSS, Stata and SAS files from R
https://haven.tidyverse.org
Other
424 stars 117 forks source link

Custom variable attributes #648

Open dusadrian opened 3 years ago

dusadrian commented 3 years ago

Besides the regular attributes (such as variable labels, values labels, variable format etc.) a variable can have different other attributes.

R has attributes SPSS has attributes Stata has characteristics SAS has column properties

Screenshot 2021-10-17 at 11 40 56

Above one can see a screenshot of an SPSS variable "v1" having a custom attribute "foo" with the value "bar".

These attributes, as far as I can tell, are neither read nor written when importing / exporting. This probably bounces to ReadStat, but it would nevertheless be a valuable feature.

gorcha commented 3 years ago

Hi!

This isn't currently supported in ReadStat - there's an issue floating around in there from a few years ago (WizardMac/Readstat#78). It looks like quite a lot of work on the ReadStat side, particularly to cover all the applicable formats, so I think this is unlikely to happen in the short term.

Leaving this open for future reference.