I'm having an issue with the write_dta function from the package haven.
My code goes like this:
lab_attr <- label$lab
attr(data, "label") <- lab_attr
attributes(data)
write_dta(data,"donnees/test_haven_1_data.dta", label = attr(data, "label"))
Which gives me the following error:
Error in validate_dta_label(label) : length(label) == 1 is not TRUE
All of my labels are under 80 characters.
Does anyone have any idea on how to fix this?
Thank you!
Have a nice day,
Cassandra