title: No dimensions of non-empty numeric vector in R
body: <p>I have a problem with my numeric vector and <code>dim()</code> in R. I want to know the dimensions of my vector X with:</p>
  
  <pre><code>dim(X)
  </code></pre>
  
  <p>However, that function returns NULL.</p>
  
  <p>If I type:</p>
  
  <pre><code>X
  </code></pre>
  
  <p>I can see that the X is not empty. Why does dim or nrow report it as "NULL"?</p>
  
  <pre><code>Part of X:
  [93486] 6.343e-01 6.343e-01 6.343e-01 6.343e-01 6.343e-01 6.343e-01 6.346e-01
  [93493] 6.346e-01 6.347e-01 6.347e-01 6.347e-01 6.347e-01 6.347e-01 6.347e-01
  [93500] 6.347e-01 6.347e-01 6.347e-01 6.347e-01 6.347e-01 6.347e-01 6.347e-01
  [93507] 6.347e-01 6.347e-01 6.347e-01 6.347e-01 6.347e-01 6.347e-01 6.347e-01
  [93514] 6.347e-01 6.347e-01 6.347e-01 6.347e-01 6.347e-01 6.347e-01 6.347e-01
  [93521] 6.347e-01 6.347e-01 6.347e-01 6.348e-01 6.348e-01 6.348e-01 6.348e-01
  [93528] 6.348e-01 6.348e-01 6.348e-01 6.348e-01 6.348e-01 6.348e-01 6.348e-01
  [93535] 6.348e-01 6.348e-01 6.348e-01 6.348e-01 6.348e-01 6.348e-01 6.348e-01
  [93542] 6.348e-01 6.348e-01 6.348e-01 6.348e-01 6.348e-01 6.348e-01 6.348e-01
  [93549] 6.348e-01 6.348e-01 6.348e-01 6.348e-01 6.348e-01 6.348e-01 6.348e-01
  [93556] 6.348e-01 6.348e-01 6.349e-01 6.349e-01 6.349e-01 6.349e-01 6.349e-01
  [93563] 6.349e-01 6.349e-01 6.349e-01 6.349e-01 6.349e-01 6.349e-01 6.349e-01
  [93570] 6.349e-01 6.349e-01 6.349e-01 6.349e-01 6.349e-01 6.349e-01 6.349e-01
  
  &gt; dim(X)
  NULL
  &gt; class(X)
  [1] "numeric"
  &gt; nrow(pvals_vector)
  NULL
  </code></pre>
  
  <p>Why is there no dimensions of X?</p>