We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Here is my shiny app. Don't really know how to reproduce without shiny (which makes it hard to debug)
I had to do a GitHub search for Internal error: adjust_color() expects an input of length 1 to figure out where this was coming from...
Internal error: adjust_color() expects an input of length 1
library(shiny) library(bslib) library(thematic) library(ggplot2) thematic::thematic_shiny() # Define UI ui <- fluidPage( theme = bs_theme(version = 5, bootswatch = "minty"), titlePanel("Shiny App with bslib, thematic, and ggplot2"), sidebarLayout( sidebarPanel( selectInput("dataset", "Choose a dataset:", choices = c("mtcars", "iris")), uiOutput("var_select") ), mainPanel( plotOutput("plot") ) ) ) # Define server logic server <- function(input, output, session) { datasetInput <- reactive({ switch(input$dataset, "mtcars" = mtcars, "iris" = iris) }) output$var_select <- renderUI({ req(datasetInput()) selectInput("variable", "Choose a variable:", choices = names(datasetInput())) }) output$plot <- renderPlot({ req(input$variable) ggplot(datasetInput(), aes({{ input$variable }})) + geom_histogram(fill = "blue", bins = 20, alpha = 0.7) + theme_minimal() }) } # Run the application shinyApp(ui = ui, server = server)
(app from ChatGPT)
Backtrace
Avis : Error in adjust_color: Internal error: adjust_color() expects an input of length 1 189: stop 188: adjust_color 185: <Anonymous> 184: mapply 183: Map 182: ggplot_build.ggplot 180: print.ggplot 175: func 173: f 172: Reduce 163: do 162: hybrid_chain 134: drawPlot 120: <reactive:plotObj> 100: drawReactive 87: renderFunc 86: output$plot 1: runApp
https://github.com/rstudio/thematic/blob/76513a7ad671257545e34381fc6ab47e8c5eaa80/R/utils.R#L5
(This works as expected with CRAN ggplot2)
The text was updated successfully, but these errors were encountered:
Thanks for the report @olivroy! The thematic package is on our radar due to revdepchecks, but we've not settled on a resolution yet.
Sorry, something went wrong.
Let's track this in rstudio/thematic#156, so we can close this here.
Successfully merging a pull request may close this issue.
Here is my shiny app. Don't really know how to reproduce without shiny (which makes it hard to debug)
I had to do a GitHub search for
Internal error: adjust_color() expects an input of length 1
to figure out where this was coming from...(app from ChatGPT)
Backtrace
https://github.com/rstudio/thematic/blob/76513a7ad671257545e34381fc6ab47e8c5eaa80/R/utils.R#L5
(This works as expected with CRAN ggplot2)
The text was updated successfully, but these errors were encountered: