I have a dataframe in R (aa) that I imported to R from a SAS export file. It has over 350 variables. I want to export summary information about the variables to a csv file and have used this:
varsum = summary(aa)
write.csv(varsum, file = 'varsum.csv')
This gives me the variable name and min, max, NA's etc but I also want to include:
- variable type (int, num etc)
- variable label (an extended explanation of the variable that comes across with the XPT file. I can see this label when I used View under the variable name.