Session Ready
Exercise

Replace missing values

In the last exercise, you noticed that for six observations, the value of RelationalNeighborSecond was missing. In this exercise, you will replace those missing values with 0.

Instructions
100 XP
  • Use summary() to inspect the RelationalNeighborSecond feature.
  • Find the indices of the observations that are missing using which() and assign to the variable toReplace.
  • Use the toReplace vector to replace the missing values instudentnetworkdata$RelationalNeighborSecond with a zero.
  • Inspect RelationalNeighborSecond again to make sure there are no longer any missing value.