Rainbow Deals - hours only!Up to 80% off on all courses and bundles.-Close
27. Exercise 2


As you saw, the last_renovation column contains some missing values. A missing value under this column indicates that a property was never renovated. We will replace NAs with the year in which a property was build (the built column).


Before we replace the NAs in the last_renovation column, let's check the number of houses which have missing values both in build and last_renovation columns.

Stuck? Here's a hint!

You'll have to to use the is.na() function inside the sum() function for both columns:

sum(is.na(houses$last_renovation) & is.na(houses$built))