'Is there a way to use the order() and head() functions together in order to print the row of the highest observation of a variable within a dataframe?
I'm trying to use order to locate the highest observation of a variable and then head to print the whole row of the dataframe that includes that observation. For example, if there were three variables (var1, var2, var3) of equal length in the dataframe, and the largest observation of var 2 was some number in row 5; how would I get all of row 5 to print out using order and head?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
