I created this data frame with station IDs and respective counts. Now I want to find the 10 largest values and the 10 smallest values in this data frame and save them in a new data frame.
station_activity <- tripdata %>% count(start.station.id)
station_activity <- station_activity %>% filter(n > 6100 & n < 100)
Line 1 was used to create the data frame seen in the picture and line 2 was used to filter by the values, but that does obviously result in an empty data frame. Is there a better version to do so, without writing a long conditional code?
