Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Factors
Summary

Instruction

If you try to replace one of the elements in a factor variable with a value that does not belong to a valid level, R will replace the designated element with NA and issue a warning. In other words, if you try entering anything other than "N" or "Y" in the phone_factor column, the value will end up as NA.

Exercise

Try replacing the first row of the phone_factor value with "Yes". Observe what happens.

Stuck? Here's a hint!

You should choose the first row and select the phone_factor column:

houses[1, ]$phone_factor <- ...