Getting day of the week from the user uploaded data in Shiny

In a Shiny app, after user uploads data df() and choosing a particular column stored in input$var_time, I would like it to automatically 'detect' what day of the week the weekly data is in for the Shiny UI element ID var_base_day.

                       value = wday(ymd(df()[[input$var_time]][1])))

I would like to get 0 as the selected value for that particular numericInput Shiny element if wday() returns 0. What are some of the variations I can try to above code?

This topic was automatically closed 54 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.