I am in the midst of dealing with a big data project where I want to filter one column from highlighting with another.
For example, I want to showcase house 1, and as a result of that, I want to compare House 1 with other values from other URBAN houses, not all houses.
table <- data.frame( house=paste("House", 1:15), category = c("Urban", "Rural", "Suburban") ) table # house category # 1 House 1 Urban # 2 House 2 Rural # 3 House 3 Suburban # 4 House 4 Urban # 5 House 5 Rural # 6 House 6 Suburban # 7 House 7 Urban # 8 House 8 Rural # 9 House 9 Suburban # 10 House 10 Urban # 11 House 11 Rural # 12 House 12 Suburban # 13 House 13 Urban # 14 House 14 Rural # 15 House 15 Suburban I tried to give this a go, but it is not working for me...
table %>% filter(house == house1) %>% filter(category == table$house) I want the output to look like this...
# house category # 1 House 1 Urban # 2 House 4 Urban # 3 House 7 Urban # 4 House 10 Urban # 5 House 13 Urban Any suggestions are truly appreciated.