dataframe - R-Shiny renders wrong results in a DataTable -
i programmed app in shiny, calculated results totally wrong :(.
i have got data.frame:
label v1 v2 1 begeisterung 6 3 2 basis 2 4 3 leistung 5 4 4 indifferent 4 6 5 reverse 0 0 6 fragwuerdig 1 1 i have calculate score "v1 , "v2". done following code:
cs_minus1 <- (ergebnis[2,2] + ergebnis[3,2]) / ((-1)*(ergebnis[1,2] + ergebnis[2,2] + ergebnis[3,2] + ergebnis[4,2])) cs_minus2 <- (ergebnis[2,3] + ergebnis[3,3]) / ((-1)*(ergebnis[1,3] + ergebnis[2,3] + ergebnis[3,3] + ergebnis[4,3])) results are: -0.4117647 -0.4705882
when calculate in normal r, absolutely works fine. in shiny receive -0.4117647 0
i have absolutely no clue, why results in shiny differ.
edit: shiny code
output$tb <- renderui({ if(is.null(datensatz())){ return () } else tabsetpanel(tabpanel("about file", tableoutput("filedf")),tabpanel("cs koeffizienten", dt::datatableoutput("table")), tabpanel("faktoren", dt::datatableoutput("table2")), tabpanel("plot", highchartoutput("table3")), tabpanel("interpretation", htmloutput("interpret"))) }) }) if use code, wrong values.
output$tb <- renderui({ tabsetpanel(tabpanel("about file", tableoutput("filedf")),tabpanel("cs koeffizienten", dt::datatableoutput("table")), tabpanel("faktoren", dt::datatableoutput("table2")), tabpanel("plot", highchartoutput("table3")), tabpanel("interpretation", htmloutput("interpret"))) }) }) if render ui without condition works fine , can see correct val. don´t understand why, me makes no sence. seems bug me.
Comments
Post a Comment