Skip to content

pickerGroupServer error related to aggregate function in R 4.2.0 #491

@jpdugo

Description

@jpdugo

pickerGroupServer throws this error:
"Warning: Error in aggregate.formula: argument 'x' is missing -- it has been renamed from 'formula'"

It is related to CHANGES IN R 4.2.0.

Here's a reprex:

library(shiny)
library(shinyWidgets)

data("mpg", package = "ggplot2")

ui <- fluidPage(
  pickerGroupUI(
    id = "my-filters",
    params = list(
      manufacturer = list(inputId = "manufacturer", label = "Manufacturer:"),
      model = list(inputId = "model", label = "Model:"),
      trans = list(inputId = "trans", label = "Trans:"),
      class = list(inputId = "class", label = "Class:")
    )
  ),
  DT::dataTableOutput(outputId = "table")
)

server <- function(input, output, session) {
  
  res_mod <- callModule(
    module = pickerGroupServer,
    id = "my-filters",
    data = mpg,
    vars = c("manufacturer", "model", "trans", "class")
  )
  
  output$table <- DT::renderDataTable(res_mod())
}

shinyApp(ui, server)

Session Info:

R version 4.2.0 (2022-04-22)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Monterey 12.0.1

Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.2/Resources/lib/libRlapack.dylib

locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] shinyWidgets_0.6.4 shiny_1.7.1       

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.8.3      magrittr_2.0.3    xtable_1.8-4      R6_2.5.1         
 [5] rlang_1.0.2       fastmap_1.1.0     tools_4.2.0       DT_0.22          
 [9] cli_3.3.0         jquerylib_0.1.4   htmltools_0.5.2   crosstalk_1.2.0  
[13] ellipsis_0.3.2    yaml_2.3.5        digest_0.6.29     fontawesome_0.2.2
[17] lifecycle_1.0.1   later_1.3.0       sass_0.4.1        htmlwidgets_1.5.4
[21] promises_1.2.0.1  cachem_1.0.6      mime_0.12         compiler_4.2.0   
[25] bslib_0.3.1       jsonlite_1.8.0    httpuv_1.6.5    

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions