title: Error(multiple matrix of different size) in output variable while applying Neural Networks in R
body: <p>I have the following columns of data for 2 countries. For one country, Sales data is available and for another country i have to predict Sales data.</p>
  
  <p>I tried to create a neural network model for prediction. But its not working as expected. After executing compute command. If I check output variable, it has multiple matrix data. </p>
  
  <pre><code>    Income     Age           Height    Location Gender  Sales
   39980.85369    73.82367044 65.18414934 City    Male    736
   4019.981729    55.82522438 61.19120942 Rural   Female  211
   8867.200772    64.96689229 66.44488547 City    Female  497
   82962.54736    42.46450702 65.89879002 City    Male    690
   35003.32743    45.72350685 62.30907541 Rural   Male    282
   76775.99037    19.11786177 66.3852918  City    Female  681
   17982.78618    22.40762641 70.8079178  City    Female  561
  </code></pre>
  
  <p><strong>dbS</strong> has 1st country values and 
  <strong>dbF</strong> has 2nd country Values</p>
  
  <pre><code> dbS$Location.f &lt;- as.numeric(factor(dbS$Location , levels=c("Rural","City")))
   dbF$Location.f &lt;- as.numeric(factor(dbF$Location , levels=c("Rural","City")))
  
   nn &lt;-  neuralnet(dbS$Sales ~ dbS$Income + dbS$Height + dbS$Location.f , data = dbS, hidden=3, threshold = 0.2)
   plot(nn)    
   test &lt;- data.frame(Income = dbF$Income, Height = dbF$Height, Location = dbF$Location.f)
  
   dbF$Sales &lt;- compute(nn,test)
   write.csv(dbF, file = "12.csv" ,row.names=FALSE)
  </code></pre>
  
  <p>If i try to write the file, I am getting following error message.</p>
  
  <pre><code>Error in .External2(C_writetable, x, file, nrow(x), p, rnames, sep, eol,  : 
  unimplemented type 'list' in 'EncodeElement'
  </code></pre>
  
  <p>Can anyone please help me or let me know if anything is not clear</p>