andrie / sss

R package to import files in the triple-s (Standard Survey Structure) format.
http://andrie.github.io/sss/
8 stars 5 forks source link

label.table #3

Closed dominiqueemmanuel closed 4 years ago

dominiqueemmanuel commented 8 years ago

Thanks for this Package !

Is it possibile to modifiy read.sss function so that it returns not only the attribute variable.labels but also an attribute assoicated with the codes (this attributes could be name label.table) ?*

For instance, we should have

attributes(d)$variable.labels
 [1] "Number of visits"                  "Attractions visited"               "Attractions visited"              
 [4] "Attractions visited"               "Attractions visited"               "Attractions visited"              
 [7] "Attractions visited"               "Attractions visited"               "Attractions visited"              
[10] "Attractions visited"               "Other attractions visited"         "Two favourite attractions visited"
[13] "Two favourite attractions visited" "Miles travelled"                   "Would come again"                 
[16] "When is that most likely to be"    "Case weight"    

But also attributes(d)$label.tableshould be a list (each element should be NULL or a name vector), with for instance

attributes(d)$label.table[[1]]
        Sherwood Forest       Nottingham Castle "Friar Tuck" Restaurant      "Maid Marion" Cafe           Mining museum 
                      1                       2                       3                       4                       5 
                  Other 
                      9 

Thanks !

Dominique