Question: Please help with a code to correctly plot filtered data in R shiny app. I am trying to plot the averages for ALB,ALP,ALT,AST,BIL,CHE,CHOL,CREA,GGT , PROT
Please help with a code to correctly plot filtered data in R shiny app. I am trying to plot the averages for ALB,ALP,ALT,AST,BIL,CHE,CHOL,CREA,GGTPROT for the selection chosen by the user. For example if the user chose age range category O and male, I want the barplot to display the averages ALB,ALP,ALT,AST,BIL,CHE,CHOL,CREA,GGTPROT for age range category O and male.
ui fluidPage titlePanelMo Importnat data" sidebarLayout sidebarPanel sliderInputrange "Range:", min mind$Age max maxd$Age stepvalue c selectInputinputId "Cat", "Category:", choices levelsd$Category radioButtonsS "Choose Male or Female:", choices levelsd$Sex mainPanel textOutputtext plotOutputcarPlotserver functioninput output output$carPlot renderPlot plotd selectCategoryAge,Sex,ALB,ALP,ALT,AST,BIL,CHE,CHOL,CREA,GGTPROTfilterCategoryinput$CatfilterSexinput$SfilterAgeinput$range & Ageinput$range TAR ggplottabacouni aesxYear, yDataValue,sizeSampleSize showTAR geompointaescolorGender scalexcontinuousname "Year",breaksinput$range:input$range scaleycontinuousname"Percentages" scalecolormanualvaluescpink"blue","green"
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
