-
Notifications
You must be signed in to change notification settings - Fork 20
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
Table corruption #108
Comments
My initial guess is of using Please try to rerun after removing two functions The code is also not reproducible as we can not access If it is not confidential, could you attach the |
I removed several lines, (I edited the above code) and I still get the same error. The data is confidential, so I can't attach it directly, but I can try to create a dummy dataset and see what happens. |
It wouldn't let me upload the rtf file (apparently it isn't supported), but here is a dummy dataset along with the code.
|
I am able to rerun your code after remove Please try it in this project. https://rstudio.cloud/project/4234539 I need to fix the bug when |
Okay, great, thanks! I am not in the office this week, so I won't be able to run it on my project until next Monday, but I took a look at the project in the could and yes, it looks like it resolved the error. I will check my project next week and let you know how it goes. |
I have been converting data in make_table1 into rtf tables for output, but when I try to open the rtf, I get an error stating that the table has been corrupted. It specifically happens when the table is longer than 1 page. The rtf file will still open, and the table looks good, but I still get the warning any time I open the file.
xdata %>%
rtf_page(
margin = c(1.5, 1, 1, 0.75, 0.25, 0.25),
border_first = "single",
border_last = "single"
) %>%
rtf_colheader(colheader = paste0(" | ", "a_d_sz", " \n n = ", "a_n_sz", " | ", "b_d_sz", " \n n = ", "b_n_sz", "| "),
col_rel_width = c(3, 1, 1, 1),
#border_top = "single",
text_font = 3) %>%
rtf_colheader(colheader = "Characteristic | n (%) or mean (SD) | n (%) or mean (SD) | SMD",
col_rel_width = c(3, rep(1,3)),
border_top = "",
text_font = 3) %>%
rtf_body(
col_rel_width = c(3, rep(1,3)),
text_justification = c("l", rep("d",3)),
cell_nrow = 1,
text_font_size = 9,
text_font = 3
) %>%
rtf_encode(
doc_type = "table",
page_footnote = "all",
page_source = "all"
) %>%
write_rtf("test.rtf")
The text was updated successfully, but these errors were encountered: