To render a histogram, create the vector of values first, based on user input then use if statements to choose which feature to view:
server.R
output$hist <- renderPlot({
vectorOfValues1 <- dataFrame$FEATUREtoPLOT1
vectorOfValues2 <- dataFrame$FEATUREtoPLOT2
if (input$variableFeat == "Choice1") {
hist(vectorOfValues1}
}
if (input$variableFeat == "Choice2") {
hist(vectorOfValues2}
}}
})
ui.R
outputPlot("hist")