I have an R dataframe where the Column names also have the label attributes. I want to export this dataframe to excel. In the excel file, I would like to display the Column label as the header instead of the Column name.
I have tried some packages like openxlsx, but they seem to only have the option of using the Column names as the headers.
This is the variable name and label shown underneath. I would like to export this data frame to an excel file. In the excel file, I would like to have "Internal id for the study" as the header instead of the default "studyid"