With the below codes, it is producing a table in rtf format with variable names rather than the labels (see screenshot at the bottom of the page). Is there a way I could read in the existing variable labels rather than manually entering the labels one by one?
listing01
listing01 %>%
rtf_page(
orientation = "landscape"
) %>%
rtf_title(
title = c(
"Listing 1",
"Enrolment, Randomisation and Completion / Discontinuation"),
text_font_size = 8
) %>%
rtf_colheader( ) %>% # NEED TO ADD VARIABLE LABELS PRE-DEFINED IN "listings_01" dataset
rtf_body(
col_rel_width = c(3, rep(3, 6)),
text_justification = "c",
text_font_size = 8,
border_left = "",
border_right = "",
border_top = "",
border_bottom = ""
) %>%
rtf_footnote() %>%
rtf_encode() %>%
write_rtf(file = "01_Listings_Enrolment_Randomisation_and_Completion_Discontinuation.rtf")