I am new to R, I want to create a frequency table, I have a data like this,
Member_id Car interest
1 FORD_MUSTANG 4
1 BUICK_Lucerne 1
1 CHEVROLET_SILVERADO 1
2 CHEVROLET_SILVERADO 1
2 FORD_MUSTANG 2
3 FORD_MUSTANG 6
I would like to have a frequency table like this:
MEmber_id FORD_MUSTANG BUICK_Lucerne CHEVROLET_SILVERADO
1 4 1 1
2 2 0 1
3 6 0 0
I have tried using table(Member_id,car), but it returns me values 1 values for each car make.
Appreciate any help.