I have a column with a set of categories e.g. Category1, Category2, Category3,Category2, etc. Is there any way to represent them in R as a matrix with the following view:
Category1 Category2 Category3
1 0 0
0 1 0
0 0 1
0 1 0
... ... ...
Any feedback is greatly appreciated.