Here's a reprex.
Error in vapply(part, function(col) {: values must be length 1,
but FUN(X[[1]]) result is length 4
Traceback:
1. repr::repr_text(tbl_obj)
2. repr_text.data.frame(tbl_obj)
3. ellip_limit_arr(obj, rows, cols)
4. arr_parts_format(parts)
5. structure(lapply(parts, arr_part_format), omit = attr(parts,
. "omit"))
6. lapply(parts, arr_part_format)
7. FUN(X[[i]], ...)
8. vapply(part, function(col) {
. if (is.matrix(col))
. apply(apply(col, 2L, format), 1L, paste, collapse = ", ")
. else format(col)
. }, character(nrow(part)))
Hi team!
Here's a reprex.
The error is being thrown by this line of code:
repr/R/repr_matrix_df.r
Line 68 in f4780e5
IIUC, this is due to the fact that
format(tbl())can return a character vector that's longer than the number of rows in the data frame. For example: