Skip to content

Instantly share code, notes, and snippets.

@jeffreyiacono
Created April 28, 2013 00:03
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save jeffreyiacono/5475250 to your computer and use it in GitHub Desktop.
fun with cut in R
require("lattice")
dt <- rnorm(1000)
dt_with_cuts <- cut(dt, breaks = c(-10, -1, 0, 1, 10), label = c("> sd below", "<= sd below", "<= sd above", "> sd above"))
xyplot(seq(1,1000) ~ dt | dt_with_cuts)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment