I'm trying to order a data set using the following:
pop_min_index <- order(pop)
When I use this, R presents "pop_min_index" as all the values from the data set, when I just want the first value, i.e. the answer should be "51", where as my result is coming out as "51, 9, 46, 35, 2, 42", etc.
I've tried using:
but this doesn't seem to work either
Does anyone know what is wrong my code?