title: How to enter data directly to make a data.frame representing a contingency table?
body: <p>I'm trying to directly enter the following data into <strong>R</strong> (which represents a contingency table) </p>
  
  <pre><code>Area        School    Coffeshop    Hospitals    Parks    Totatl  
  Washington     142          120           20       20       302   
  Seattle        120          140           30       40       330 
  Total          262          260           50       60       632
  </code></pre>
  
  <p>My code is this:</p>
  
  <pre><code>n&lt;-c("Area","School","Cofeeshop","Hospitals","Parks","Total") 
  x&lt;-c("Washington",142,120,20,20,302)
  y&lt;-c("Seattle",120,140,30,40,330)
  z&lt;-c("Total",262,260,50,60,631)
  data&lt;-cbind(n,x,y,z)
  data&lt;-data.frame(data)
  </code></pre>