You've got a couple of options.
The first is to add those names to the table object "by hand".
## An example of a table object with unnamed dimnames
x <- with(warpbreaks, table(unname(wool), unname(tension)))
x
# L M H
# A 9 9 9
# B 9 9 9
names(dimnames(x)) <- c("Time1", "Time2")
x
# Time2
# Time1 L M H
# A 9 9 9
# B 9 9 9
The second (and typically preferable) option is to supply the names in your initial call to table()
, like this:
table(Time1 = warpbreaks[[2]], Time2 = warpbreaks[[3]])
# Time2
# Time1 L M H
# A 9 9 9
# B 9 9 9