I am intrested in creating a factor out of 4 variables that were suggested as being one factor in my Factor Analysis. Now i am trying to create exactly this factor to enter in my analysis, however as.factor(x) does not combine my dummy variables.
We can use interaction
with(df1, interaction(col1, col2, col3, col4, drop = TRUE))