Skip to content

options(expressions=) and the associated information about JS call stack size should be documented #374

Open
@JeremyPasco

Description

@JeremyPasco

Hi,
I'm having errors on the following script with webr 0.2.2, which works fine on R standalone installation.

install.packages("gtsummary")
gtsummary::trial |> gtsummary::tbl_strata(
          strata = c(grade),
          .tbl_fun = ~ .x |> gtsummary::tbl_summary(by = trt) |> gtsummary::add_overall(last = T),
          .header = "**{strata}**, N = {n}"
         ) |> gtsummary::as_gt() |> gt::as_raw_html(F)

This procudes the following error:

Uncaught (in promise) Error: evaluation nested too deeply: infinite recursion / options(expressions=)?
at captureR (blob:https://localhost:9000/1f4eb65b-40f0-468b-bb99-d2ee8c23bbd0:4727:15)
at evalR (blob:https://localhost:9000/1f4eb65b-40f0-468b-bb99-d2ee8c23bbd0:4739:19)
at PostMessageChannelWorker.dispatch (blob:https://localhost:9000/1f4eb65b-40f0-468b-bb99-d2ee8c23bbd0:4365:28)
at PostMessageChannelWorker. (blob:https://localhost:9000/1f4eb65b-40f0-468b-bb99-d2ee8c23bbd0:3024:44)

Removing the following part solves the issue but I don't get why:
|> gtsummary::add_overall(last = T)

With some variations, sometimes I get a different error:
payload.ts:39 Uncaught (in promise) Error: In argument: tbl = switch(...).
at captureR (blob:https://localhost:9000/b614354a-8ee1-4b1b-947f-f1c0a62bc18a:4727:15)
at evalR (blob:https://localhost:9000/b614354a-8ee1-4b1b-947f-f1c0a62bc18a:4739:19)
at PostMessageChannelWorker.dispatch (blob:https://localhost:9000/b614354a-8ee1-4b1b-947f-f1c0a62bc18a:4365:28)
at PostMessageChannelWorker. (blob:https://localhost:9000/b614354a-8ee1-4b1b-947f-f1c0a62bc18a:3024:44)

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsImprovements or additions to documentationtidy-dev-day 🤓

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions