title: Export describe.by (package psych) as csv file in R
body: <p>Does anyone know how to export describe.by statistics to csv in R? I get this message:</p>
  
  <pre><code>estatistica &lt;- describe.by(pag,list(pag$Jogo)
  
    write.table(estatistica,file="H:/Myfile.csv",sep=",")
    "Erro em as.data.frame.default(x[[i]], optional = TRUE, stringsAsFactors = stringsAsFactors) : 
    cannot coerce class ""by"" to a data.frame"
  </code></pre>
  
  <p>Since its such a general question, a general example would do.</p>
  
  <pre><code>        Jogo  Pais  Numero
            A  Canada    1
            B  Canada    2
            C  Canada    1
            D  Canada    4
            A  Brazyl    6
            B  Brazyl    7
            A  France    1
            B  France    1
            C  France    2
            D  France    3
  </code></pre>