我一直在寻找一种方法来创建一个带有徽标/图像的表作为数据表的列。我附上了一张我想要的那种桌子的图片。数据表取自使用 的示例library(formattable),我在“id”列顶部粘贴了徽标以显示我正在寻找的设计类型。理想情况下,这会更整洁且可定制(也许整个表格背景为黑色,白色/灰色书写等。有人可以分享任何示例吗?

创建没有徽标的可格式化表格的代码:
df <- data.frame(
id = 1:10,
name = c("Bob", "Ashley", "James", "David", "Jenny",
"Hans", "Leo", "John", "Emily", "Lee"),
age = c(28, 27, 30, 28, 29, 29, 27, 27, 31, 30),
grade = c("C", "A", "A", "C", "B", "B", "B", "A", "C", "C"),
test1_score = c(8.9, 9.5, 9.6, 8.9, 9.1, 9.3, 9.3, 9.9, 8.5, 8.6),
test2_score = c(9.1, 9.1, 9.2, 9.1, 8.9, 8.5, 9.2, 9.3, 9.1, 8.8),
final_score = c(9, 9.3, 9.4, 9, 9, 8.9, 9.25, …Run Code Online (Sandbox Code Playgroud)