Finding cosine similarity between dataframes using R
<p>I have two data frames containing information from various hospitals. The first has number of probable cases of dengue and the second has number of comfirmed cases of dengues.The data is given weekly wise. I have data upto 53 weeks or 1 year.
     Example-</p>

<pre><code>    Data Frame 1(Probable cases)
    HospitalName Week1 Week 2
         xyz       8     12
         abc       9      0
    Data Frame 2(Laboratory verified cases)
    HospitalName Week1 Week 2
         xyz       3     11
         abc      14      0
</code></pre>

<p>Both the data frames have the same names of hospitals in corresponding rows.
I want to find the similarity between the two data frames using cosine similarity in R. How to do it?</p>