In this tutorial, we will learn how to select top and bottom rows of a dataframe based on the values of a column with tidyverse in R. Here we will see a specific approach to get top and bottom rows when the values of the column of interest has both positive and negative values. … [Read more...] about How to select top and bottom rows by a column simultaneously
dplyr slice_max()
slice_max: get rows with highest values of a column
In this tutorial, we will learn how to get rows with maximum values of a column or variable from a dataframe. For example, from a dataframe with multiple rows and columns we will find a row (or multiple rows) with maximum values for a column. We will use dplyr's slice_max() … [Read more...] about slice_max: get rows with highest values of a column