Skip to content

set_left_padding #365

@ggrothendieck

Description

@ggrothendieck

I am using pdf on Windows. The code below works but if you replace 20 with 2 it seems that the b rows are indented instead of the a rows! What is happening (and this took me hours to figure out) is that the default left padding is 6 so when I used 2 it was shifting the rows left relative to the b rows making it look like the b rows had been padded rather than the a rows. I think there should be some note about this in the documentation of set_left_padding given how subtle this is.

library(dplyr)
library(huxtable)

dat <- data.frame(x = c("a", "a", "b", "b", "b"))
ht <- dat %>%
  as_hux %>%
  set_left_padding(row = which(.$x == "a"), col = "x", value = 20)

quick_pdf(ht, file = "hux.pdf")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions