-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generators labelled()
and labelled_spss()
don’t support adding label
attribute
#362
Comments
A PR would be great! |
Ok, just fixed that myself to avoid blocking you. |
huftis
added a commit
to huftis/haven
that referenced
this issue
Jun 20, 2018
The constructor functions `labelled()` and `labelled_spss()` now support adding the `label` attribute to the resulting object. The `label` is a short, human-readable description of the object, and is now also used when printing, and can be easily removed using the new `zap_label()` function. Fixes tidyverse#362. Previously, the `label` attribute was supported both when reading and writing SPSS files, but it was not possible to actually create objects in R having the `label` attribute using the constructors `labelled()` or `labelled_spss()`.
huftis
added a commit
to huftis/haven
that referenced
this issue
Jun 27, 2018
The constructor functions `labelled()` and `labelled_spss()` now support adding the `label` attribute to the resulting object. The `label` is a short, human-readable description of the object, and is now also used when printing, and can be easily removed using the new `zap_label()` function. Fixes tidyverse#362. Previously, the `label` attribute was supported both when reading and writing SPSS files, but it was not possible to actually create objects in R having the `label` attribute using the constructors `labelled()` or `labelled_spss()`.
huftis
added a commit
to huftis/haven
that referenced
this issue
Jun 27, 2018
The constructor functions `labelled()` and `labelled_spss()` now support adding the `label` attribute to the resulting object. The `label` is a short, human-readable description of the object, and is now also used when printing, and can be easily removed using the new `zap_label()` function. Fixes tidyverse#362. Previously, the `label` attribute was supported both when reading and writing SPSS files, but it was not possible to actually create objects in R having the `label` attribute using the constructors `labelled()` or `labelled_spss()`.
hadley
pushed a commit
that referenced
this issue
Aug 28, 2018
…384) The constructor functions `labelled()` and `labelled_spss()` now support adding the `label` attribute to the resulting object. The `label` is a short, human-readable description of the object, and is now also used when printing, and can be easily removed using the new `zap_label()` function. Fixes #362. Previously, the `label` attribute was supported both when reading and writing SPSS files, but it was not possible to actually create objects in R having the `label` attribute using the constructors `labelled()` or `labelled_spss()`.
This old issue has been automatically locked. If you believe you have found a related problem, please file a new issue (with reprex) and link to this issue. https://reprex.tidyverse.org/ |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The
labelled()
andlabelled_spss()
generator functions supports adding alabels
attribute, but they don’t have a built-in mechanism for adding alabel
attribute. (Thelabel
attribute hold a short descripton of the variable.) This despite the fact thathaven
actually has very good support for thelabel
attribute, e.g. when both writing and reading SPSS files.Suggestion: Add a
label
argument to thelabelled()
andlabelled_spss()
functions. This would add the argument content as alabel
attribute. Although the argument logically belongs next to thelabels
argument, it’s probably best to add it as the last argument of the functions, in case people have used argument position when calling the functions.Here’s a reprex illustrating that 1) the generator functions have no arguments for specifying the
label
attribute, and 2) exporting and importing to the SPSS format does support thelabel
attribute (and correctly loses ‘unknown’ attributes):I could probably create a PR if this is of interest.
The text was updated successfully, but these errors were encountered: