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

tibbles nested inside tibbles cause infinite recursion in repr_html #155

Open
michaelquinn32 opened this issue Jul 30, 2022 · 0 comments
Open

Comments

@michaelquinn32
Copy link

Hi team!

Here's a reprex

library(repr)
library(tibble)

tbl_obj <- tibble::tibble(
  col1 = tibble::tibble(
    inner_col1 = 1
  )
)
repr::repr_html(tbl_obj)
Error: C stack usage  23918976 is too close to the limit
Execution halted

The issue is related to this line of code:

repr/R/utils.r

Line 162 in f4780e5

if (do_flatten) flatten(x[, start:end]) else x[, start:end]

I think the problem is indexing behaviors in tibbles vs data frames. A data frame will "drop" and return a vector if only one column is selected. tibbles don't do this by default. Setting drop = TRUE should fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant