title: R correlation score calculation
body: <p>My dataset contains information such as <code>feedbackDate</code> and Subcategory(issue) and location (6 months data). The temporal calculation was by cross tabulating the subcategory of issues with their <code>feebackDate</code>s and then calculating Pearson correlation score for every pair of cross tabulated issues. See the code below</p>
  
  <pre><code>#weekly correlation
  require(ISOweek)
  datacfs_date$FeedbackWeek &lt;- ISOweek(datacfs_date$FeedbackDate)
  raw_timecor_matrix &lt;- table(datacfs_date$SubCategory, datacfs_date$FeedbackWeek)
  raw_timecor_matrix &lt;- t(raw_timecor_matrix)
  timecor_matrix &lt;- cor(raw_timecor_matrix)
  
  #Invert correlation to get distance matrix
  inverse_tcc &lt;- 1-timecor_matrix
  </code></pre>
  
  <p>Now the question is how do I calculate this on biweekly and monthly basis instead of weekly correlation of six months data.</p>