rotation

0th

Percentile

Text rotation

Functions to get or set the text rotation property of huxtable cells.

Usage
rotation(ht)
rotation(ht) <- value
set_rotation(ht, row, col, value, byrow = FALSE)
Arguments
ht

A huxtable.

value

A numeric vector. Anti-clockwise from the x axis, so 0 is left to right, 90 is going up, etc. Set to NA to reset to the default, which is 0.

row

A row specifier. See rowspecs for details.

col

An optional column specifier.

byrow

If TRUE, fill in values by row rather than by column.

Details

You will probably need to set col_width() and row_height() explicitly to achieve a nice result, in both HTML and LaTeX.

Value

For rotation, the rotation property. For set_rotation, the ht object.

Aliases
  • rotation
  • rotation<-
  • set_rotation
Examples
# NOT RUN {
ht <- huxtable(a = 1:3, b = 1:3)
rotation(ht) <-  90
rotation(ht)


ht <- huxtable(a = 1:3, b = 3:1)
ht2 <- set_rotation(ht, 90)
rotation(ht2)
ht3 <- set_rotation(ht, 1:2, 1, 90)
rotation(ht3)
ht4 <- set_rotation(ht, 1:2, 1:2, c(90, 270), byrow = TRUE)
rotation(ht4)
ht5 <- set_rotation(ht, where(ht == 1), 90)
rotation(ht5)
# }
Documentation reproduced from package huxtable, version 4.2.0, License: MIT + file LICENSE

Community examples

Looks like there are no examples yet.