In R, type the call that averages `amount` while dropping any missing values.
In R, type the call that averages `amount` while dropping any missing values.
Answer
mean(orders$amount, na.rm = TRUE)
With one NA, mean() alone returns NA; na.rm = TRUE removes the missing values first and returns 438.1818 for the eleven known orders.