movies <- tabulate_table() %>%
table_add_row(
c("S/N", "Movie Name", "Director", "Estimated Budget", "Release Date")) %>%
table_add_row(
c("tt1979376", "Toy Story 4", "Josh Cooley", "$200,000,000",
"21 June 2019")) %>%
table_add_row(
c("tt3263904", "Sully", "Clint Eastwood", "$60,000,000",
"9 September 2016")) %>%
table_add_row(
c("tt1535109", "Captain Phillips", "Paul Greengrass", "$55,000,000",
" 11 October 2013"))
# center align 'Director' column
movies[,3] %>% format_font_align("center")
# right align 'Estimated Budget' column
movies[,4] %>% format_font_align("right")
# right align 'Release date' column
movies[,5] %>% format_font_align("right")
# center-align and color header cells
for (i in 1:5) {
movies[1,i] %>%
format_font_color("yellow") %>%
format_font_align("center") %>%
format_font_style("bold")
}
print(movies)
#> +-----------+------------------+-----------------+------------------+------------------+
#> | S/N | Movie Name | Director | Estimated Budget | Release Date |
#> +-----------+------------------+-----------------+------------------+------------------+
#> | tt1979376 | Toy Story 4 | Josh Cooley | $200,000,000 | 21 June 2019 |
#> +-----------+------------------+-----------------+------------------+------------------+
#> | tt3263904 | Sully | Clint Eastwood | $60,000,000 | 9 September 2016 |
#> +-----------+------------------+-----------------+------------------+------------------+
#> | tt1535109 | Captain Phillips | Paul Greengrass | $55,000,000 | 11 October 2013 |
#> +-----------+------------------+-----------------+------------------+------------------+