Skip to content
Prev 106753 / 398506 Next

Crosstab from sql dump

Hello all,,

Im looking for a simple function to produce a crosstab from a dumped
sql query result. Its very hard to produce crosstabs with most
databases (Access being the exception), so with the vast array of R
packages, Im sure this has to have already been implemented somewhere.

Examples are always good:
Take a csv dump like

name code
user1 100
user2 100
user1 200
user2 210
user1 300
user2 300

and produce

user1 user2
100 100
200 210
300 300

Thanks in advance for any suggestions,

Alan