title: How do I execute this unique reshaping in R (or excel)?
body: <p>I am trying to reshape a data frame, and the task is just different enough from a typical reshape that I can't quite swing it. The table is originally in excel, but I've already imported to R, so I can work with a solution in either software.</p>
  <p>I have a data frame <code>donors</code> containing names, values, and months:</p>
  <pre><code>NAME    AMT    MONTH
  brett   100    jan
  brett   100    mar
  brett   100    nov
  brett   50     apr
  brett   50     jun
  jane    75     dec
  sam     200    jan
  sam     200    feb
  sam     200    mar
  </code></pre>
  <p>I need to reshape this data frame so that there is a NAME column, an AMT column, and a column for each month. Each row corresponds to any observation that is unique in both name and amount, and the month columns are binary variables (1 if that donor/amount combo occurred that month, and 0 if not.</p>
  <p>So the above example would work out to:</p>
  <pre><code>NAME   AMT   JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV DEC
  brett  100   1   0   1   0   0   0   0   0   0   0   1   0
  brett  50    0   0   0   1   0   1   0   0   0   0   0   0
  jane   75    0   0   0   0   0   0   0   0   0   0   0   1
  sam    200   1   1   1   0   0   0   0   0   0   0   0   0
  </code></pre>
  <p>if you want to complete my code, create a final column equal to the total number of times that NAME/AMT combo occurred (just equal to the sum of the month columns)... but I can do that myself if you aren't feeling it.</p>
  <p>Thank you!</p>