Have a dataframe (frame 1) with a column (fact) that is composed of factors I have created a new data frame(frame2) as follow:
Matching_list <- setNames(data.frame(matrix(ncol = 3, nrow = nrow(HH))), c("ProIDS", "Pol_Centre", "Dist"))
Now when I select some elements from the variable, fact, in the first dataframe and affect them to the new dataframe, all these elements are turned into integers. So, I see integer numbers (numbers that I don't know where they came from) instead the original description in the first dataframe.
Could you please give me some tips, how can I perform the affectation without loosing information (I mean, keep my factors as they are in the first data frame)