# Will a transformed categorical dataset lead to different results?

Suppose we have a dataset, where Y and X are categorical. Y can only take the value 0 or 1. There are two ways how to represent the data (where of course Color and Shape will be factorized i.e. blue = 1, red = 2, green = 3, triangle = 1, circle = 2):

1. ID    Defect    Color    Shape

1      0       blue    triangle
2      1       red     circle
3      1       green   circle


The second way of representing the data is the following (binary):

    ID    Defect    red     blue    green    triangle    circle
1       0        0        1       0         1           0
2       1        1        0       0         0           1
3       1        0        0       1         0           1


Just imagine that we have a bigger dataset with more variables and observations. Can you tell from your experience, whether the setting of the datasets above will have an impact on the result?

Will for example the random forest packages handle both types of datasets?