Use a variable as a factor to give rows in a table.
Factor( x, name = deparse(expr), levelnames = levels(x), texify = getOption("tables.texify", FALSE), expr = substitute(x), override = TRUE )
Useful links