Skip to content
Prev 278726 / 398502 Next

Help with recast() syntax

On Nov 29, 2011, at 12:32 AM, Chris Conner wrote:

            
This section of the structure has two NEG's for 201109 and none for POS.
After fixing the POS/NEG discrepancy, this works:

 > dcast(DF, YR_MO ~ RESULT, value_var="TOT_TESTS")
     YR_MO NEG POS
1  201011 349  66
2  201012 393  98
3  201101 376 109
4  201102 371 122
5  201103 396 113
6  201104 367 111
7  201105 406 113
8  201106 383 146
9  201107 394 124
10 201108 412 130
11 201109 379 120