title: R: how to get frequency count by each date and hour
body: <p>I have a dataframe with four variables: "Period", "cell_id", "daterank", and "timerank".
  I would like to get a frequency of the cell id's (there are 115 unique levels (or cell_id's)) for each date and each hour by individual Period.
  "Period" is a numeric identifier for an individual (5 individuals)
  "daterank" has values 0-29 
  "timerank" has values 1-24
  "cell_id" are numeric identifiers for cells within a spatial grid (on a map). Example values are 101,102,103,104,105,201..205,2401..2405.</p>
  
  <p>The only way I can figure how to do it so far is:</p>
  
  <pre><code>####get data by period######2051, 2483, 2507, 2627, 2723###
  ##tag2051##
  tag2051 = subset(fr10000, Period=="2051") ###where fr10000 is the object
  head(tag2051)
  (d11 = subset(tag2051, daterank=="11")) 
  ###here, I have to go through each daterank and
  timerank combination = wate of time!!
  t11h2= subset(d11, timerank=="2")
  t11h2
  frqt11h2= table(t11h2$cell_id)
  cbind(frqt11h2)
  </code></pre>
  
  <p>Is there a way I can get the frequency of "cell_id" for each "daterank" and each "timerank" by "Period" without having to keep changing 
  the daterank and timerank value input manually?</p>