/examples/tableplot.R

https://code.google.com/ · R · 14 lines · 6 code · 4 blank · 4 comment · 0 complexity · b43f83c3deca1ad9a22383d77f2d67b8 MD5 · raw file

  1. # load diamonds dataset from ggplot2
  2. require(ggplot2)
  3. data(diamonds)
  4. # default tableplot
  5. tableplot(diamonds)
  6. # customized tableplot
  7. tableplot(diamonds, colNames=c("carat", "cut", "color", "clarity", "price"), sortCol="price", from=0, to=5)
  8. # apply filter
  9. tableplot(diamonds, filter="price < 5000 & cut=='Premium'")
  10. tableplot(diamonds, filter="cut")