You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When SAS dataset (.sas7bdat) has a label then it is not preserved while using read_sas(). Could you please add this feature to retain dataset label? I attached the dataset and I had to change the extension to .txt otherwise GitHub won't attach. Please change the extension to .sas7bdat for your testing.
/*example in SAS*/dataOUTDATA.data1 (label='This is a data1 label');
x=1;
run;
dataOUTDATA.data2 (label='This is a data2 label');
x=1;
run;
proc sql noprint;
createtablelabelsasselect memname, memlabel
fromdictionary.tableswhere libname='OUTDATA'
;
run;
proc print data = labels;
run;
/*the output is*//* Obs MEMNAME MEMLABEL 1 DATA1 This is a data1 label 2 DATA2 This is a data2 label */
# when reading with haven::read_sas() the dataset label is gone. the dataset data1.sas7bdat is attachedzz<-haven::read_sas("/entimice/data1.sas7bdat")
str(zz)
# The output is # > zz <- haven::read_sas("/entimice/data1.sas7bdat") # > str(zz) # Classes ‘tbl_df’, ‘tbl’ and 'data.frame': 1 obs. of 1 variable: # $ X: num 1 - attr(*, "label")= chr "DATA1"
The text was updated successfully, but these errors were encountered:
Dear developer,
When SAS dataset (.sas7bdat) has a label then it is not preserved while using
read_sas()
. Could you please add this feature to retain dataset label? I attached the dataset and I had to change the extension to.txt
otherwise GitHub won't attach. Please change the extension to.sas7bdat
for your testing.data1.txt
The text was updated successfully, but these errors were encountered: