Repeat the previous exercise, but this time order my_df so that the states are ordered from least populous to most populous. Hint: create an object ind that stores the indexes needed to order the population values. Then use the bracket operator [ to re-order each column in the data frame.
Now compute the average again, but only for the entries that are not NA. Hint: remember the ! operator.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here