title: Assigning names and types to the columns of an empty data frame
body: <p>I found the following command to create an empty data frame whose columns have a name and a type:</p>
  <pre><code>dataFrameMio = data.frame(&quot;col1&quot; = character(0), &quot;col2&quot; = numeric(0), &quot;col3&quot;= numeric(0))
  
  class(dataFrameMio$col1)  # character OK
  class(dataFrameMio$col2)  # numeric OK
  class(dataFrameMio$col3)  # numeric OK
  </code></pre>
  <p>And I found this code where the type is automatically set to logical. Is it possible to specify the type also in this case?</p>
  <pre><code>colonne = c(&quot;col4&quot;, &quot;col5&quot;, &quot;col6&quot;)
  dataFrameMio2 = data.frame((matrix(nrow = 0, ncol = length(colonne))))
  colnames(dataFrameMio2) = colonne
  print(dataFrameMio2)
  
  class(dataFrameMio2$col4)  # logical
  class(dataFrameMio2$col5)  # logical
  class(dataFrameMio2$col6)  # logical
  </code></pre>