I have a doubt about what will be the right way to use or represent categorical variables with only two values like "sex". I have checked it up from different sources, but I was not able to find any solid reference. For example, if I have the variable sex I usually see this in this form:
id sex 1 male 2 female 3 female 4 male
and also in this way:
Therefore, which one would be more adequate way to deal with this variable, for example, in a classification system. I am inclined to go with the dummy variables, but I would like some opinion about it.