```
# NOT RUN {
my_table <- t(apply(cars, 2, function(x) # Create data
round(c(Mean = mean(x), SD = sd(x), Min = min(x), Max = max(x)), 2)
))
apa_table(
my_table
, align = c("l", rep("r", 3))
, caption = "A summary table of the cars dataset."
)
apa_table(
cbind(my_table, my_table)
, align = c("l", rep("r", 8))
, caption = "A summary table of the cars dataset."
, note = "This table was created using apa\\_table()"
, added_stub_head = "Variables"
, col_spanners = list(`Cars 1` = c(2, 5), `Cars 2` = c(6, 9))
)
apa_table(
list(`Cars 1` = my_table, `Cars 2` = my_table)
, caption = "A summary table of the cars dataset."
, added_stub_head = "Variables"
)
# }
```

Run the code above in your browser using DataCamp Workspace