aggregate data with multiple functions

Dear board,
I am trying to aggregate a table with the following function:
sumtable <- reactive({aggregate(rf()$Ct, rf()[input$by1], FUN = function(x) mean(x), sd(x)})

This works well on the R command line as
aggregate(rf$Ct, rf["Gene"], FUN = function(x) c(mean(x), sd(x)))

but when I try it in a shiny script, it gives an error message in the mainPanel: Error: number of items to replace is not a multiple of replacement length.

Does anyone have an idea what I am doing wrong here?

thanks a lot in advance

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.