You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Write into doc object and pull titles/footnotes from excel file
doc <- rtf_doc(ht) %>% titles_and_footnotes_from_df(
from.file='./data/titles.xlsx',
reader=example_custom_reader,
table_number='14-1.01') %>%
set_font_size(10) %>%
set_ignore_cell_padding(TRUE) %>%
set_column_header_buffer(top=1)
Error details:
Error: `correct_defaults(var)` must be a vector, a bare list, a data frame or a matrix.
Run `rlang::last_error()` to see where the error occurred.
> rlang::last_error()
<error/tibble_error_need_rhs_vector>
`correct_defaults(var)` must be a vector, a bare list, a data frame or a matrix.
Backtrace:
1. `%>%`(...)
5. pharmaRTF::titles_and_footnotes_from_df(...)
6. pharmaRTF:::read_hf(...)
7. pharmaRTF:::fill_missing_data(.data, columns)
9. tibble:::`[<-.tbl_df`(`*tmp*`, is.na(.data[var]), var, value = NULL)
10. tibble:::tbl_subassign(x, i, j, value, i_arg, j_arg, substitute(value))
11. tibble:::vectbl_wrap_rhs_row(value, value_arg)
> rlang::last_trace()
<error/tibble_error_need_rhs_vector>
`correct_defaults(var)` must be a vector, a bare list, a data frame or a matrix.
Backtrace:
x
1. +-`%>%`(...)
2. +-pharmaRTF::set_column_header_buffer(., top = 1)
3. +-pharmaRTF::set_ignore_cell_padding(., TRUE)
4. +-pharmaRTF::set_font_size(., 10)
5. \-pharmaRTF::titles_and_footnotes_from_df(...)
6. \-pharmaRTF:::read_hf(...)
7. \-pharmaRTF:::fill_missing_data(.data, columns)
8. +-base::`[<-`(`*tmp*`, is.na(.data[var]), var, value = NULL)
9. \-tibble:::`[<-.tbl_df`(`*tmp*`, is.na(.data[var]), var, value = NULL)
10. \-tibble:::tbl_subassign(x, i, j, value, i_arg, j_arg, substitute(value))
11. \-tibble:::vectbl_wrap_rhs_row(value, value_arg)
I've tracked this down to an update in tibble 3.1.0 that has broken pharmaRTF. I'll be closing this issue here and raising it in that repository once I'm able to figure out the root cause and a solution.
@DawnYe Issue has been found. While we're working on a fix in pharmaRTF you can still run the replication by doing the following: remotes::install_version("tibble", "3.0.6")
and restarting your R session.
Greetings.
Errors occurred when creating
DOC
:Error details:
The text was updated successfully, but these errors were encountered: