title: Viewing single column of data frame in R
body: <p>I am running a simulation model that creates a large data frame as its output, with each column corresponding to the time-series of a particular variable:</p>
  
  <pre><code>data5&lt;-as.data.frame(simulation3$baseline)
  </code></pre>
  
  <p>Occasionally I want to look at subsets, especially particular columns, of this data frame in order to get an idea of the output. For this I am using the View-function like so</p>
  
  <pre><code>View(data5[1:100,1])
  </code></pre>
  
  <p>for instance, if I wish to see the first 100 rows of column 1. Alternatively, I also sometimes do something like this, using the names of the time series:</p>
  
  <pre><code>timeframe=1:100
  toAnalyse=c("u","u_n","u_e","u_nw")
  View(data5[timeframe,toAnalyse])
  </code></pre>
  
  <p>In either case, there is an annoying display problem when I am trying to view a single column on its own (as for instance with View(data5[1:100,1])), whereby what I get looks like this:</p>
  
  <p><a href="https://i.stack.imgur.com/6QqpW.png" rel="nofollow noreferrer">Example 1</a></p>
  
  <p>As you can see, the top of the table which would usually contain the name of the variable in the dataset instead contains a string of all values that the variable takes. This problem does not appear if I select 2 or more columns:</p>
  
  <p><a href="https://i.stack.imgur.com/ReN9f.png" rel="nofollow noreferrer">Example 2</a></p>
  
  <p>Does anyone know how to get rid of this issue? Is there some argument that I can feed to View to make sure that it behaves nicely when I ask it to just show a single column?</p>