Skip to content

Instantly share code, notes, and snippets.

@hadley
Created October 24, 2012 20:19
Show Gist options
  • Select an option

  • Save hadley/3948595 to your computer and use it in GitHub Desktop.

Select an option

Save hadley/3948595 to your computer and use it in GitHub Desktop.
df <- setNames(as.data.frame(matrix(nrow = 0, ncol = 2)), c("x", "y"))
# Works
qplot(x, y, data = df)
qplot(x, y, data = df, geom = "smooth")
qplot(x, y, data = df, geom = "density")
# Doesn't work
qplot(x, data = df, geom = "density")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment