title: How to get create a select input widget in R shiny which depends on another widget input
body: <p>I am trying to build a shiny webapp with R. I am collecting data from mongodb database. My data has a lot of fields. I am trying to do as follows:</p>
  <ol>
  <li>A reactive widget whose value will depend on another widget input.</li>
  </ol>
  <p>My code has only one part as app.R. I have watched the tutorial and a few online writeups, but things are not clear to me.</p>
  <p>Suppose my data table has 5 rows Year, Name, ID, and Result. Now suppose I want to make a widget that will show the available option for Name. And when someone selects a name next widget will only show the corresponding Result for that selected name.</p>
  <p>Can anyone give me any code example?</p>