New Codes
We can actually perform the same operation as in the previous exercise using the function which.min
. It basically tells us which is the minimum value.
This exercise is part of the course
Data Science R Basics
Exercise instructions
Write one line of code that gives the index of the lowest population entry.
Use the which.min
command.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
# Find the index of the smallest value for variable total
which.min(murders$total)
# Find the index of the smallest value for population