
Last chance! 50% off unlimited learning
Sale ends in
Combine rows or columns
# S3 method for huxtable
cbind(..., deparse.level = 1, copy_cell_props = TRUE)# S3 method for huxtable
rbind(..., deparse.level = 1, copy_cell_props = TRUE)
Vectors, matrices, data frames or huxtables.
Passed to cbind.data.frame
.
Cell properties to copy from neighbours (see below).
A huxtable.
Table properties will be taken from the first argument which is a huxtable. So will row properties (for cbind) and column properties (for rbind).
If some of the inputs are not huxtables, and copy_cell_props
is a character vector of cell properties,
then for rbind, the named cell properties and row heights will be copied to non-huxtables. For cbind,
the named cell properties and column widths will be copied. Objects on the left or above get priority
over those on the right or below.
If copy_cell_props
is TRUE
, the default
set of cell properties (everything but colspan
and rowspan
) will be copied.
If copy_cell_props
is FALSE
, cells from non-huxtable objects will get the
default properties.
# NOT RUN {
ht1 <- hux(a = 1:3, b = 4:6)
ht2 <- hux(d = letters[1:3], e = letters[4:6])
bold(ht1)[1,] <- TRUE
bold(ht2) <- TRUE
vec <- LETTERS[1:3]
ht_out <- cbind(ht1, vec, ht2)
ht_out
bold(ht_out)
bold(cbind(ht1, vec, ht2, copy_cell_props = FALSE))
# }
Run the code above in your browser using DataLab