title: How do I write a R dataframe to a csv file when every row has its own dataframe?
body: <p>I have a dataframe where the rows all have their own dataframes. When I use the write.csv() function to save this dataframe into a csv file, I receive the following error:</p>
  
  <blockquote>
    <p>Error in write.table(staff, "Chiefs of Staff.csv", col.names = NA, sep = ",",  : 
     unimplemented type 'list' in 'EncodeElement'</p>
  </blockquote>
  
  <p>Here is the code I used</p>
  
  <pre><code>chiefs_of_staff&lt;-jsonlite::fromJSON("http://www.infogo.gov.on.ca/infogo/v1/individuals/search?&amp;keywords=chief%20of%20staff&amp;topOrgId=0&amp;locale=en&amp;_=1569503878383")
  
   staff&lt;-chiefs_of_staff$individuals
   write.csv(staff,'Chiefs of Staff.csv')
  </code></pre>
  
  <p>Any help would be much appreciated.</p>