# NOT RUN {
crosstab <- read.csv(system.file("extdata", "example_crosstab.csv", package="xltabr"))
tab <- initialise()
top_headers_row_1 <- c("", "", "Car type", "Car type", "Car type")
top_headers_row_2 <- c("Drive", "Age", "Sedan", "Sport", "Supermini")
top_headers <- list(top_headers_row_1, top_headers_row_2)
tab <- add_top_headers(tab, top_headers)
# }
Run the code above in your browser using DataLab