Multiple conditionalPanel. How do I make them 1 variable?
<p>I would like to make multiple plots of the grades of students, but every student has different courses. To make sure a different list of courses appears I used <code>conditionalPanel</code> as seen below.</p>

<pre><code>selectInput("name", label = h3("Choose a name"),
  choices = list("Claire" = "Claire", "Thomas" = "Thomas", "Alex" = "Alex"),
  selected = "Claire"),
conditionalPanel(
  condition = "input.name == 'Claire'",
  checkboxGroupInput("cour1", "Courses",
    list("Biology", "Mathematics", "Chemistry", "English", "French"),
    selected = "Biology")
  ),
conditionalPanel(
  condition = "input.bedr == 'Thomas'",
  checkboxGroupInput("cour2", "Courses",
    list("Economics", "History", "English", "Spanish", "Geography "),
    selected = "Economics")
</code></pre>

<p>The problem is that every students now has his/her own course variable (<code>cour1</code>,<code>cour2</code>), but I don't want to make 20 or so  different codes (for every student) to make the graphs.</p>

<p>I tried to make one variable like this:</p>

<pre><code>if (input$name == "Clair"){
    input$cour &lt;- input$cour1
}
</code></pre>

<p>This gave the error:</p>

<blockquote>
  <p>Attempted to assign value to a read-only reactivevalues object</p>
</blockquote>