The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.

Example 8: Title Header

Table with a Title Header

A title header is a special type of title block. The title header displays titles on the left side, and header information on the right side. The title header can be defined with the title_header() function. This style of header is preferred by some organizations.

library(reporter)

# Create temp file name
tmp <- file.path(tempdir(), "example8.rtf")

tbl <- create_table(mtcars[1:10, ], width = 7) %>% 
       title_header("Listing 4.0", "MTCARS Data Listing with Title Header", 
               right = c("Page [pg] of [tpg]",  "Study: Cars"),
               blank_row = "both") 

# Create the report
rpt <- create_report(tmp, output_type = "RTF",
                     font = "Courier", font_size = 12) %>% 
  page_header(left = "Client: Motor Trend", right = "Study: Cars",
              blank_row = "below") %>% 
  add_content(tbl) %>% 
  set_margins(top = 1, bottom = 1) %>% 
  footnotes("* Motor Trend, 1974") %>% 
  page_footer(left = Sys.time(), 
        center = "Confidential", 
        right = "Page [pg] of [tpg]")

# Write the report
write_report(rpt)

# file.show(tmp)

Next: Example 9: RTF, PDF, HTML, and DOCX

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.