My data.frame looks like this
ID | test | test_result
1 | B | 10
2 | A | 9
3 | A | 11
4 | C | 7
5 | F | 5
And I want to get something like this:
test | test_reult_ID1 | test_result_ID2 | test_result_ID3 ...
A | NA | 9 | 11
B | 10 | NA | NA
It works with reshape() to the wide format with only a few cases but with the whole data frame (about 23.000 ID´s) reshape () takes too long. Melt() and cast() do reshape the data but replace the values in test_result by the frequency of the test. Any other ideas how to manage this? Thanks!