Table position may be "left", "right" or "center". If you want text to wrap around the table, use "wrapleft" or "wrapright".

position(ht)
position(ht) <- value
set_position(ht, value)

Arguments

ht

A huxtable.

value

String. "left", "center", "right", "wrapleft" or "wrapright". Set to NA to reset to the default, which is "center".

Value

position() returns the position property. set_position() returns the modified huxtable.

Details

"wrapleft" and "wrapright" position the table to the left or right, and allow text to wrap around the table.

Examples


position(jams) <-  "right"
position(jams)
#> [1] "right"

set_position(jams, "left")
#>   Type           Price  
#>   Strawberry      1.90  
#>   Raspberry       2.10  
#>   Plum            1.80  
#> 
#> Column names: Type, Price
set_position(jams, "right")
#>                                                           Type           Price  
#>                                                           Strawberry      1.90  
#>                                                           Raspberry       2.10  
#>                                                           Plum            1.80  
#> 
#> Column names: Type, Price
set_position(jams, "center")
#>                               Type           Price  
#>                               Strawberry      1.90  
#>                               Raspberry       2.10  
#>                               Plum            1.80  
#> 
#> Column names: Type, Price