I currently have an app setup where it lets the user input which variable they want to plot and visualize. I am running into an issue when I am trying to pass off the shiny input variable into summarize.
testData <- plotData %>%
summarize(means=mean(input$selectedMetric, na.rm=TRUE)) %>%
summarize(sd=sd(input$selectedMetric, na.rm=TRUE))
The error I get is the following:
Warning in mean.default(input$selectedMetric, na.rm = TRUE) :
argument is not numeric or logical: returning NA
How am I supposed to set it up so that it takes the mean and standard deviation of whatever selected column the user decides?