Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

R 語言上手篇

8,531 views

Published on

這學期在臺大電機所碩士班的「資料科學」上介紹R 的投影片

Published in: Technology
  • Dating for everyone is here: ♥♥♥ http://bit.ly/39sFWPG ♥♥♥
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Dating direct: ❤❤❤ http://bit.ly/39sFWPG ❤❤❤
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD FULL eBOOK INTO AVAILABLE FORMAT ......................................................................................................................... ......................................................................................................................... 1.DOWNLOAD FULL. PDF eBook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB eBook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. doc eBook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. PDF eBook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB eBook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. doc eBook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, CookeBOOK Crime, eeBOOK Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

R 語言上手篇

  1. 1. RR Wush Wu
  2. 2. R R R R R Rstudio R R swirl R · · · · · · · · 00: R 02: - - 2/75
  3. 3. R 3/75
  4. 4. R http://myfootpath.com/careers/engineering-careers/statistician-careers/ 4/75
  5. 5. R http://www.r-bloggers.com/mapping-the-worlds-biggest-airlines/ 5/75
  6. 6. R http://r4stats.com/2013/03/19/r-2012-growth-exceeds-sas-all-time-total/ 6/75
  7. 7. R 7/75
  8. 8. R http://img.diynetwork.com/DIY/2003/09/18/t134_3ca_med.jpg 8/75
  9. 9. R R R · · 9/75
  10. 10. R 10/75
  11. 11. - · · 11/75
  12. 12. - plot(density(x))· 12/75
  13. 13. - shaprio.test(x) · Shapiro-Wilk normality test data: x W = 0.93385, p-value = 8.287e-05 13/75
  14. 14. - · plot(density(x1), xlim = range(c(x1, x2)), main = "Sample PDF") lines(density(x2), col = 2) legend("topright", c("x1", "x2"), lty = 1, col = 1:2) 14/75
  15. 15. - 15/75
  16. 16. - ks.test(x1, x2)· Two-sample Kolmogorov-Smirnov test data: x1 and x2 D = 0.2, p-value = 0.2719 alternative hypothesis: two-sided 16/75
  17. 17. - A/B A 10000 10 B 5000 3 / · · · · 17/75
  18. 18. - A/B R · A B 10000 10 - 3/5000 - · # A 3 / 5000 p <- 3/5000 # 1000 10000 A plot(density(x <- rbinom(1000, 10000, p))) 18/75
  19. 19. - A/B · 19/75
  20. 20. - A/B mean(x > 10)· [1] 0.046 20/75
  21. 21. - A/B · library(binom) binom.confint(c(10, 3), c(10000, 5000), methods = "exact") method x n mean lower upper 1 exact 10 10000 1e-03 0.0004796397 0.001838264 2 exact 3 5000 6e-04 0.0001237515 0.001752444 21/75
  22. 22. - A/B paper· · 22/75
  23. 23. R 23/75
  24. 24. - R· - 24/75
  25. 25. - suppressPackageStartupMessages(library(PerformanceAnalytics)) chart.Correlation(iris[-5], bg=iris$Species, pch=21) 25/75
  26. 26. - round(Ca <- cor(attitude), 2) symnum(Ca) # simple graphic heatmap(Ca, symm = TRUE, margins = c(6,6)) 26/75
  27. 27. - · R- 27/75
  28. 28. - data(edhec) chart.ACFplus(edhec[,1,drop=FALSE]) 28/75
  29. 29. - 29/75
  30. 30. R 30/75
  31. 31. R · · - - - · API - - · 31/75
  32. 32. ChihChengLiang: R Crawler 2015· 32/75
  33. 33. R· Google Sheets R API Google Map Excel Minitab, S, SAS, SPSS, Stata, Systat and Weka... DBI - - - - - 33/75
  34. 34. -- [1] "TWII" TWII.OPEN TWII.HIGH TWII.LOW TWII.CLOSE TWII.VOLUME TWII.ADJUSTED 7871.41 7937.26 7843.60 7920.80 5710600 7920.80 7954.96 7999.42 7917.30 7917.30 5951400 7917.30 7929.89 7955.90 7901.24 7934.51 5717400 7934.51 7940.20 7942.23 7821.71 7835.57 5181400 7835.57 7778.57 7797.57 7736.11 7736.71 4292400 7736.71 7778.38 7827.93 7778.38 7790.01 4516000 7790.01 library(quantmod) getSymbols("^TWII") head(TWII) 34/75
  35. 35. - chartSeries(TWII, subset = "last 4 months", TA = c(addVo(), addBBands())) 35/75
  36. 36. - YEARID NAME RANK W L R RA 1871 Boston Red Stockings 3 20 10 401 303 1871 Chicago White Stockings 2 19 9 302 241 1871 Cleveland Forest Citys 8 10 19 249 341 1871 Fort Wayne Kekiongas 7 7 12 137 243 1871 New York Mutuals 5 16 17 302 313 1871 Philadelphia Athletics 1 21 7 376 266 library(Lahman) head(Teams[,c("yearID", "name", "Rank", "W", "L", "R", "RA")]) 36/75
  37. 37. - 37/75
  38. 38. - PLAYERID YEARID W L ERA wangch01 2005 8 5 4.02 wangch01 2006 19 6 3.63 wangch01 2007 19 7 3.70 wangch01 2008 8 2 4.07 wangch01 2009 1 6 9.64 wangch01 2011 4 3 4.04 38/75
  39. 39. - suppressPackageStartupMessages({ library(jiebaR) # library(tm) # library(slam) # library(wordcloud) # library(topicmodels) # library(igraph) # }) 39/75
  40. 40. - Sheng-Wei Chen , / 2014 40/75
  41. 41. - Sheng Wei Chen 2014 41/75
  42. 42. - 42/75
  43. 43. Shiny Gallery: · · K-means Example- 43/75
  44. 44. API Server OpenCPU APP: · · Stocks- 44/75
  45. 45. SparkR RHadoop MPI · · · Rmpi pbdMPI - - 45/75
  46. 46. R Community R Rstudio R R Community R swirl · Hadley Wickham R- · 46/75
  47. 47. Hadley R PACKAGE DOWNLOADS 1 Rcpp 208987 2 ggplot2 182208 3 stringr 168142 4 stringi 167407 5 plyr 166594 6 digest 158068 7 magrittr 156989 8 scales 152784 9 reshape2 147723 10 RColorBrewer 140949 R Hadley· 47/75
  48. 48. R · Taiwan R User Group ptt R_Language R - - - 48/75
  49. 49. R Rstudio 49/75
  50. 50. R R Rstudio · · 50/75
  51. 51. R Windows: CRAN R3.2· 3.0.2 3.2 - - 51/75
  52. 52. R Mac: CRAN R3.2· R - - 52/75
  53. 53. R Ubuntu: Ubuntu 14.04 CRAN· http://cran.csie.ntu.edu.tw/bin/linux/ubuntu/README.htm- 53/75
  54. 54. Rstudio Rstudio· Rstudio Windows UTF-8 - - 54/75
  55. 55. Rstudio · · · · 55/75
  56. 56. RStudio > "hello world" Enter 1 + 1 Enter 1 + Enter + Ctrl + C ESC > me Enter me tab · · · · · · · 56/75
  57. 57. RStudio R Script me Ctrl + Enter me me tab · · · · 57/75
  58. 58. RStudio · 58/75
  59. 59. R 59/75
  60. 60. R 60/75
  61. 61. R Rstudio library( ) · · · 61/75
  62. 62. swirl R 62/75
  63. 63. swirl swirl windows· Taiwan R User Group- # install.packages(c('swirl', 'curl'), repos = 'http://taiwanrusergroup.github.io/R') 63/75
  64. 64. swirl library(swirl) library(curl) 64/75
  65. 65. swirl swirl() # R swirl · · 65/75
  66. 66. swirl swirl swirl swirl · · · install_course_github("wush978", "DataScienceAndR", "course") · 66/75
  67. 67. swirl DataScienceAndR · 67/75
  68. 68. swirl Windows · · · 68/75
  69. 69. · R Rstudio( ) Taiwan R User Group DataScienceAndR - - - - 69/75
  70. 70. 1. RBasic-01-Introduction 2. RBasic-02-Data-Structure-Vectors 3. RBasic-03-Data-Structure-Object 4. RBasic-04-Factors 5. RBasic-05-Arrays-Matrices 6. RBasic-06-List-DataFrame 7. RBasic-07-Loading-Dataset · 70/75
  71. 71. RBasic-01-Introduction < >.zip ceiba · RBasic-02-HW.R RBasic-03-HW.R RBasic-04-HW.R RBasic-05-HW.R RBasic-06-HW.R RBasic-07-HW.R - - - - - - · 71/75
  72. 72. < >.zip· d01921016/ d01921016/RBasic-02-HW.R d01921016/RBasic-03-HW.R d01921016/RBasic-04-HW.R d01921016/RBasic-05-HW.R d01921016/RBasic-06-HW.R d01921016/RBasic-07-HW.R submit()· 72/75
  73. 73. ... bug https://github.com/wush978/DataScienceAndR/issues windows · ... sessionInfo() - - · 73/75
  74. 74. Q&A 74/75
  75. 75. R vs Python Choosing R or Python for data analysis? An infographic Pros and Cons of R vs Python Sci-kit learn Which is better for data analysis: R or Python? How to Choose Between Learning Python or R First · · · · 75/75

×