tests/testthat/_snaps/top-n.md

top_n() quotes n

Code
  res1 <- top_n(mtcars, n() * 0.5)
Message
  Selecting by carb
Code
  res2 <- top_n(mtcars, 16)
Message
  Selecting by carb

top_frac() is a shorthand for top_n(n()*)

Code
  res1 <- top_n(mtcars, n() * 0.5)
Message
  Selecting by carb
Code
  res2 <- top_frac(mtcars, 0.5)
Message
  Selecting by carb


hadley/dplyr documentation built on Nov. 6, 2024, 4:48 p.m.