I am trying to subset a dataframe by multiple values in one column.
The input is the following:
Output should be:
So i want only the rows in the new dataframe, which contains 0 AND 1 in the column "Auto" - grouped for each shop.
Already tried this, but doesnt work:
test <- subset(rawdata, Auto
== 0 &Auto
== 1)
test <- subset(rawdata, min(Auto
) == 0 & max(Auto
) == 1)
test<- rawdata[ which(rawdata$Auto
'==0 & rawdata$Auto
== 1), ]
Thanks for any help. Regards