Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug]: wrapping crashes with what I guess is nothing to wrap ("") #414

Closed
Melkiades opened this issue Oct 7, 2022 · 0 comments
Closed

Comments

@Melkiades
Copy link
Contributor

Melkiades commented Oct 7, 2022

lyt <- basic_table(title = "") %>% # if title = " " or nothing in the parenthesis it works fine
    split_rows_by("SEX", page_by = TRUE) %>%
    analyze("AGE")

tbl <- build_table(lyt, DM)

res <- export_as_pdf(tbl, file = "to_d.pdf")

table is:

> tbl
                   all obs
--------------------------
F                         
  Mean              34.13 
M                         
  Mean              34.32 
U                         
  Mean               NA   
UNDIFFERENTIATED          
  Mean               NA   

error is:

> res <- export_as_pdf(tbl, file = "to_d.pdf")
Error in wrap_string(xi, max_width) : 
  is.character(str) && length(str) == 1 is not TRUE
@Melkiades Melkiades added the bug label Oct 7, 2022
@Melkiades Melkiades changed the title [bug]: wrapping crashes with NA in the table [bug]: wrapping crashes with what I guess is nothing to wrap ("" or NA or NULL) Oct 7, 2022
@Melkiades Melkiades changed the title [bug]: wrapping crashes with what I guess is nothing to wrap ("" or NA or NULL) [bug]: wrapping crashes with what I guess is nothing to wrap ("") Oct 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant