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

tibble::view() error, variable name limitation #4702

Open
benhmin opened this issue Sep 17, 2024 · 3 comments
Open

tibble::view() error, variable name limitation #4702

benhmin opened this issue Sep 17, 2024 · 3 comments
Labels
bug Something isn't working lang: r support

Comments

@benhmin
Copy link

benhmin commented Sep 17, 2024

System details:

Positron and OS details:

Mac OS 14.6.1, ARM/M2
Positron Version: 2024.09.0 (Universal) build 27
Code - OSS Version: 1.92.0
Commit: d996153
Date: 2024-09-11T02:38:46.408Z
Electron: 30.1.2
Chromium: 124.0.6367.243
Node.js: 20.14.0
V8: 12.4.254.20-electron.0
OS: Darwin arm64 23.6.0

Interpreter details: R 4.4.1

Describe the issue:

In Positron it seems that the tibble::view() command does not work for any df above a certain size. The error returned is:
Error in exists(): ! variable names are limited to 10000 bytes

The length of variable names does not seem to impact the occurrence of the error, rather the size/length of the data frame?

Steps to reproduce the issue:

  1. This code works:
    head(palmerpenguins::penguins, 50) |> tibble::view()
  2. This code works:
    palmerpenguins::penguins |> utils::View()
  3. This code doesn't (error as above):
    palmerpenguins::penguins |> tibble::view()

Expected or desired behavior:

would expect the tibble::view() command to appropriately pass objects to either utils::View() or as.data.frame() . . . as described here: https://tibble.tidyverse.org/reference/view.html

Maybe this is an issue with tibble more than with positron, but this problem does not occur in RStudio 2024.04.2+764 on the same machine. This is a very commonly used package (tidyverse) and the view() command typically is used rather than the utils::View() function once the tidyverse is loaded.

@petetronic
Copy link
Collaborator

Thank you @benhmin for testing Positron! I'm able to reproduce this issue, sending to Triage.

@juliasilge juliasilge added the bug Something isn't working label Sep 19, 2024
@juliasilge
Copy link
Contributor

Here is the full traceback:

Error in `exists()`:
! variable names are limited to 10000 bytes
Hide Traceback
    ▆
 1. ├─tibble::view(palmerpenguins::penguins)
 2. │ └─rlang::eval_tidy(quo(view_fun(!!x, !!title)))
 3. └─view_fun(`<tibble[,8]>`, "palmerpenguins::penguins")
 4.   ├─base::isTRUE(exists(object_name, envir = parent.frame(), inherits = FALSE))
 5.   └─base::exists(object_name, envir = parent.frame(), inherits = FALSE)

And here is what tibble is doing:

eval_tidy(quo(view_fun(!!x, !!title)))

@DavisVaughan
Copy link
Contributor

DavisVaughan commented Sep 19, 2024

Oh gosh its inlining the whole data frame 😭 cc @lionel-

We should probably do a tibble PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working lang: r support
Projects
None yet
Development

No branches or pull requests

4 participants