Skip to content

Instantly share code, notes, and snippets.

@nstrayer
Created October 6, 2017 17:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nstrayer/c471dd5122352560fe4fa69a82671649 to your computer and use it in GitHub Desktop.
Save nstrayer/c471dd5122352560fe4fa69a82671649 to your computer and use it in GitHub Desktop.
library(tidyverse)
data_frame(
x = 1:20,
y = rnorm(20)
) %>%
mutate( y_tertile = ntile(y, 3) )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment