This is probably a easier one. (Preferable tidyverse solution)
Two questions Q1. Why doesnt below give me top 4 rows by maximum Sepal.Length values
library(tidyverse)
1. iris %>% top_n(Sepal.Length,4)
Q2 I want to do the opposite of top_n, slice_max. I want to show the dataframe without the top n rows within a dataframe
library(tidyverse)
#something like below
iris %>% filter(!top_n(Sepal.Length,4))
The output for 1. should be 4 rows, the output of 2. should be 146 rows (150-4 rows by top Sepal.Length values without ties)