Introduction to R

2,868 views

Published on

Published in: Education, Technology, Design
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,868
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
183
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Introduction to R

  1. 1. Introduction to 2012-09-21 @HSPH Kazuki Yoshida, M.D. MPH-CLE student
  2. 2. Menun What is R?n How does it compare to others?n What are the advantages/disadvantages of R?n Let’s install R.n Editors and GUIs: How to make R more friendly
  3. 3. What is ? http://www.r-project.org
  4. 4. isa language andenvironment forstatistical computingand graphics http://www.r-project.org/about.html
  5. 5. Menun What is R?n How does it compare to others?n What are the advantages/disadvantages of R?n Let’s install R.n Editors and GUIs: How to make R more friendly
  6. 6. Many statistical packages
  7. 7. Software SAS Stata JMP R SPSS $65/yr Cost (+Parallels& $179 Free for you None $55/yr Windows) Menus or Commands Menus (orMode of use Commands Menus commands (or menus) commands) Very Moderately Seasonal Rel. rare. Rare. MorePrevalence prevalent prevalent cases in Incidence prevalent in at HSPH esp. in Epi esp in Bio June increasing? wild
  8. 8. Other packagesn CDC Epi Info: Field epidemiologyn TreeAgePro: Decision sciencen SUDAAN: Survey datan WinBUGS: Markov chain Monte Carlon Python: General-purpose programming languagen matlab, mathematica: Mathematics
  9. 9. Courses taught in Rn BIO 232 (Fall) Stat Methods In BIO 509 (Fall) Intro Stat Comp Environmentsn BIO 503 (Winter) Program and Stat Model in R http://isites.harvard.edu/icb/icb.do?keyword=k84377n ID 271 (Spring) Adv Regression for Env Epin HMS BMI713.0 (Fall) Comp Stat for Biomed Sci http://informaticstraining.hms.harvard.edu/content/lectures-and-problem-sets
  10. 10. Menun What is R?n How does it compare to others?n What are the advantages/disadvantages of R?n Let’s install R.n Editors and GUIs: How to make R more friendly
  11. 11. Advantages
  12. 12. is Free as in free beerhttp://en.wikipedia.org/wiki/Free_Beer
  13. 13. isFree as in freedom http://www.thefreedomtrail.org
  14. 14. People care about free http://chereemoore.blogspot.com/2011/06/live-free-or-die.html
  15. 15. is Developed by Robert Gentleman Ross Ihaka & user communityCore Developer Team:Douglas Bates, John Chambers, Peter Dalgaard, Seth Falcon, Robert Gentleman (Left), KurtHornik, Stefano Iacus, Ross Ihaka (Right), Friedrich Leisch, Uwe Ligges, Thomas Lumley, MartinMaechler, Duncan Murdoch, Paul Murrell, Martyn Plummer, Brian Ripley, Deepayan Sarkar,Duncan Temple Lang, Luke Tierney, Simon Urbanek http://www.nytimes.com/2009/01/07/technology/business-computing/07program.html?pagewanted=all
  16. 16. 4000+contributed packages Fast development http://r4stats.com/articles/popularity/
  17. 17. http://had.co.nz/ggplot2/ Flexible Graphicshttp://www.stat.auckland.ac.nz/~paul/RG2e/ http://cran.r-project.org/web/packages/wordcloud/index.html
  18. 18. http://rpubs.com/kaz_yos/1285
  19. 19. pROC survival/rmshttp://www.r-bloggers.com/u-s-unemployment-data- animated-choropleth-maps/
  20. 20. Watch additionalon-site demo
  21. 21. http://www.stat.auckland.ac.nz/~paul/ RG2e/chapter16.html http://cran.r-project.org/web/packages/animation/index.html
  22. 22. Disadvantages
  23. 23. Learning a new Llanguage is hard
  24. 24. R Commander: EZR: http://socserv.mcmaster.ca/jfox/Misc/Rcmdr/ http://www.jichi.ac.jp/saitama-sct/SaitamaHP.files/statmedEN.html Lack of standard GUI Deducer:http://www.deducer.org/
  25. 25. NHANES3 dataset Lack of variable labeling Use memisc for partial fix
  26. 26. Not great for big data (yet) Use ff, bigmemory, etchttp://newscenter.berkeley.edu/2012/03/29/nsf-big-data-grant/
  27. 27. http://techreport.com/articles.x/15818 Single core use Turn on parallelization explicitly
  28. 28. Menun What is R?n How does it compare to others?n What are the advantages/disadvantages of R?n Let’s install R.n Editors and GUIs: How to make R more friendly
  29. 29. Let’s getstarted!!
  30. 30. Download!! http://www.r-project.org http://rstudio.org
  31. 31. http://www.r-project.org
  32. 32. GUI toolkit
  33. 33. http://rstudio.org
  34. 34. OR
  35. 35. Install!!
  36. 36. Follow on-site instruction
  37. 37. Menun What is R?n How does it compare to others?n What are the advantages/disadvantages of R?n Let’s install R.n Editors and GUIs: How to make R more friendly
  38. 38. Comparison ofenvironments
  39. 39. Standalone R.appFully functional Poor editor
  40. 40. RStudio editor http://rstudio.orgFully functional Not GUI
  41. 41. ESS on emacs editor http://ess.r-project.orgFully functional emacs is hard
  42. 42. Deducer GUI http://www.deducer.orgEasy dialogues Very limited functionality
  43. 43. R Commander GUI http://socserv.mcmaster.ca/jfox/Misc/Rcmdr/More functional Less sophisticated
  44. 44. EZR modification of R Commander GUI http://www.jichi.ac.jp/saitama-sct/SaitamaHP.files/ statmedEN.htmlFocus on medical research Still in early development
  45. 45. For YourInformation
  46. 46. websitesn Download: http://www.r-project.orgn Look for packages: http://cran.r-project.org/web/ views/n Look up abbreviations.: http://www.r- bloggers.com/abbreviations-of-r-commands- explained-250-r-abbreviations/n Get up-to-date info: http://www.r-bloggers.com
  47. 47. editorsn RStudio: http://www.rstudio.orgn ESS for emacs: http://ess.r-project.org
  48. 48. GUIn R Commander: http://socserv.mcmaster.ca/jfox/ Misc/Rcmdr/n EZR: http://www.jichi.ac.jp/saitama-sct/ SaitamaHP.files/statmedEN.htmln Deducer: http://www.deducer.org/n Rattle: http://rattle.togaware.com

×