title: How to create and bind an empty multidimensional array
body: <p>I want to create a empty multidimensional array and then bind it to an existing array. </p>
  
  <p>If my array was not empty, I can bind it with the <code>abind</code> package:</p>
  
  <pre><code>library(abind)
  c=matrix(0,2,3)
  test=array(0,c(2,3,1))
  test2=abind(test,c,along=3)
  test2 #exactly what I expected
  , , 1
  
       [,1] [,2] [,3]
  [1,]    0    0    0
  [2,]    0    0    0
  
  , , 2
  
       [,1] [,2] [,3]
  [1,]    0    0    0
  [2,]    0    0    0
  </code></pre>
  
  <p>Now I want to do the same thing except instead of two full arrays, I want one of them to be empty. Here is what would happen if I had characters:</p>
  
  <pre><code>test3=character() #this is empty
  test3=c(test3,'hi') #I bind the word hi to it
  test3
  [1] "hi"
  </code></pre>
  
  <p>This does not exactly work if I try to use arrays:</p>
  
  <pre><code>empty=array()
  abind(empty,test,along=3)
  Error in abind(empty, test, along = 3) : 
  'X1' does not fit: should have `length(dim())'=3 or 2
  </code></pre>
  
  <p>So I am assuming that <code>array()</code> is not how you create an empty multidimensional array.</p>
  
  <p>Note the differences between the two commands:</p>
  
  <pre><code>empty=array()
  &gt; empty
  [1] NA
  test3=character()
  &gt; test3
  character(0)
  </code></pre>