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
Cyrus