The question is as follows:
Create a new variable that assumes the value 1 when the house type is House, 2 if the type is Penthouse, 3 if the type is Flat / Apartment or Studio and 0 otherwise. Use the table() function on the new variable.
the variables House type consists of the following unique values: "House", "Flat/Apartment", "new development", "duplex", "Penthouse", "studio", "bungalow", "Mews".
Does anyone now which dplyr function I need to solve this question?