Skip to content

[Bug]: tm_variable_browser Warning: Error in if: argument is of length zero #804

@m7pr

Description

@m7pr

What happened?

When running example

# CDISC example data
library(sparkline)
data <- teal_data()
data <- within(data, {
  ADSL <- rADSL
  ADTTE <- rADTTE
})
join_keys(data) <- default_cdisc_join_keys[names(data)]

app <- init(
  data = data,
  modules = modules(
    tm_variable_browser(
      label = "Variable browser"
    )
  )
)
if (interactive()) {
  shinyApp(app$ui, app$server)
}

Open the app, and select second dataset

Plot does not show + console prints an error
image

> if (interactive()) {
+   shinyApp(app$ui, app$server)
+ }

Listening on http://127.0.0.1:7659
Warning: Error in if: argument is of length zero
  122: getDims
  121: catch
  120: value[[3L]]
  119: tryCatchOne
  118: tryCatchList
  117: tryCatch
  116: do
  115: hybrid_chain
  114: <reactive:plotObj>
   98: drawReactive
   85: renderFunc
   84: output$teal-teal_modules-variable_browser-module-variable_plot-plot_main
    3: runApp
    2: print.shiny.appobj
    1: <Anonymous>

sessionInfo()

No response

Relevant log output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct.

Contribution Guidelines

  • I agree to follow this project's Contribution Guidelines.

Security Policy

  • I agree to follow this project's Security Policy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcore

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions