title: R ggplot2: use one column as x-axis and the rest as y-axis
body: <p>I have a large df resembling the following</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>A</th>
  <th>B</th>
  <th>C</th>
  <th>D</th>
  <th>E</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>1</td>
  <td>10</td>
  <td>3</td>
  <td>9</td>
  <td>5</td>
  </tr>
  <tr>
  <td>2</td>
  <td>4</td>
  <td>6</td>
  <td>9</td>
  <td>5</td>
  </tr>
  <tr>
  <td>4</td>
  <td>8</td>
  <td>12</td>
  <td>7</td>
  <td>3</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>I am trying to make a scatter plot where column A is the x-values and all values in the rest of the columns are the y-values with each column a separate color. I have tried the following but receive the error <code>Error: unexpected ']' in p1</code></p>
  <pre><code>p1 &lt;- ggplot(data = df.p, aes(df.p, aes(x=colnames(df.p[1]), y = colnames(df.p[2:]), colour=df.p[2:]))) + geom_point() + scale_colour_identity()
  
  </code></pre>
  <p>I have also tried <code>x=get(colnames(df.p[1]))</code> and <code>x=df.p[1]</code> but I always get the same error</p>
  <p>I tried the solution <a href="https://stackoverflow.com/questions/22426732/how-to-plot-one-column-vs-the-rest-in-r">here</a> but got the error</p>
  <pre><code>Error: At least one layer must contain all faceting variables: `variable`.
  * Plot is missing `variable`
  * Layer 1 is missing `variable`
  </code></pre>