-
Notifications
You must be signed in to change notification settings - Fork 117
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
Dates in labelled_spss #742
Comments
I would like to second this issue. |
Hi @greenhorn82, The Adding a variable label only requires the addition of a "label" attribute - I'd recommend checking out the labelled package, which has a set of helper functions to make this easier where creating a full labelled vector is not required. For e.g.: library(haven)
library(labelled)
data_example <- data.frame(example_date1 = lubridate::ymd(20101215))
var_label(data_example$example_date1) <- "testlabel"
write_sav(data_example, "example.sav") |
We know these function don't currently support date variables. I would just be great to add this functionality, especially since a software like Stata does support value labels for date variables. This makes conversion from Stata incomplete, and exporting to SPSS likewise. Library |
Hi,
when using labelled_spss with date columns it converts all columns to numeric and exports them incorrectly. Without adding a label write_sav can correctly export dates.
Robert
The text was updated successfully, but these errors were encountered: