I have a data frame in R with around 4 millions observations. There are 9 different values/levels in column "Property Type" and I want to simplify it by changing those 9 values to be either "House" or "Apartment". How can I do this?
- Example data:
Property_Type
privateHome
oneBedApt
Apt
twoBedApt
- Expected output:
Property_Type
House
Apartment
Apartment
Apartment