+ All Categories
Home > Documents > Explorative Datenanalyse in R

Explorative Datenanalyse in R

Date post: 03-Jun-2018
Category:
Upload: handgemenge
View: 243 times
Download: 0 times
Share this document with a friend

of 32

Transcript
  • 8/12/2019 Explorative Datenanalyse in R

    1/32

    Explorative Datenanalyse in R

    Rolf Andreas Just @HandgemengeBarcamp Hannover 201 !"c#1

  • 8/12/2019 Explorative Datenanalyse in R

    2/32

    Rolf Andreas Just @Handgemenge Explorative Datenanalyse in R

    $arum Daten visualisieren%Daten& Anscom"e'(uartett x1 x2 x3 x4 y1 y2 y3 y41 10 10 10 8 8.04 9.14 7.46 6.582 8 8 8 8 6.95 8.14 6.77 5.763 13 13 13 8 7.58 8.74 12.74 7.714 9 9 9 8 8.81 8.77 7.11 8.845 11 11 11 8 8.33 9.26 7.81 8.476 14 14 14 8 9.96 8.10 8.84 7.047 6 6 6 8 7.24 6.13 6.08 5.258 4 4 4 19 4.26 3.10 5.39 12.509 12 12 12 8 10.84 9.13 8.15 5.5610 7 7 7 8 4.82 7.26 6.42 7.9111 5 5 5 8 5.68 4.74 5.73 6.89

  • 8/12/2019 Explorative Datenanalyse in R

    3/32

  • 8/12/2019 Explorative Datenanalyse in R

    4/32

    Rolf Andreas Just @Handgemenge Explorative Datenanalyse in R

    $arum Daten visualisieren%Bilder&

  • 8/12/2019 Explorative Datenanalyse in R

    5/32

    Rolf Andreas Just @Handgemenge Explorative Datenanalyse in R

    explorativ% Beispiel&

  • 8/12/2019 Explorative Datenanalyse in R

    6/32

    Rolf Andreas Just @Handgemenge Explorative Datenanalyse in R

    explorativ% Beispiel&

  • 8/12/2019 Explorative Datenanalyse in R

    7/32

    Rolf Andreas Just @Handgemenge Explorative Datenanalyse in R

    "is #ier&

    )tru*tur in Daten +ird in grafisc#er Darstellungse#r viel deutlic#er als in ta"ellarisc#en,a#len*olonnen

    in der -esamt#eit der Daten lassen sic# Einsic#ten

    finden. die in *einem ein/elnen Datensat/ stec*en

  • 8/12/2019 Explorative Datenanalyse in R

    8/32

    Rolf Andreas Just @Handgemenge Explorative Datenanalyse in R

    (uellen&

    #ttp& "log o*cupid com index p#p t#e'"iggest'lies'in'online'dating #ttp& de +i*ipedia org +i*i Anscom"e'(uartett

    http://blog.okcupid.com/index.php/the-biggest-lies-in-online-dating/http://blog.okcupid.com/index.php/the-biggest-lies-in-online-dating/http://de.wikipedia.org/wiki/Anscombe-Quartetthttp://de.wikipedia.org/wiki/Anscombe-Quartetthttp://blog.okcupid.com/index.php/the-biggest-lies-in-online-dating/http://blog.okcupid.com/index.php/the-biggest-lies-in-online-dating/
  • 8/12/2019 Explorative Datenanalyse in R

    9/32

    Rolf Andreas Just @Handgemenge Explorative Datenanalyse in R

    R

    rogrammiersprac#e und Ent+ic*lungsumge"ungf3r )tatisti* und Datenvisualisierung +++ r'pro4ect org -56 f3r $indo+s 7inux 8ac 9pen )ource -:5 7i/en/ RE 7 ;Read Eval rint 7oop< =RA: ;>#e =ompre#ensive R Arc#ive :et+or*< ? 000 ac*ages

    http://www.r-project.org/http://www.r-project.org/
  • 8/12/2019 Explorative Datenanalyse in R

    10/32

    Rolf Andreas Just @Handgemenge Explorative Datenanalyse in R

    >ools f3r R

    R)tudio Rcmdr R f3r Eclipse R*+ard >inn'R

  • 8/12/2019 Explorative Datenanalyse in R

    11/32

    Rolf Andreas Just @Handgemenge Explorative Datenanalyse in R

    R =ommunity

    #ttp& stac*overflo+ com uestions tagged r

  • 8/12/2019 Explorative Datenanalyse in R

    12/32

    Rolf Andreas Just @Handgemenge Explorative Datenanalyse in R

    #ands on R

    citation() licence() anscombe help()

    demo() plot(1:10) scan()

  • 8/12/2019 Explorative Datenanalyse in R

    13/32

    Rolf Andreas Just @Handgemenge Explorative Datenanalyse in R

    1 Beispiel> x plot(x)>

  • 8/12/2019 Explorative Datenanalyse in R

    14/32

    Rolf Andreas Just @Handgemenge Explorative Datenanalyse in R

    1 Beispiel

  • 8/12/2019 Explorative Datenanalyse in R

    15/32

    Rolf Andreas Just @Handgemenge Explorative Datenanalyse in R

    2 Beispiel > x y par(mfrow=c(2,2))> hist(x, col=2)> qqnorm(x)> qqplot(x, y)> boxplot(x, col="green")>

  • 8/12/2019 Explorative Datenanalyse in R

    16/32

    Rolf Andreas Just @Handgemenge Explorative Datenanalyse in R

    2 Beispiel

  • 8/12/2019 Explorative Datenanalyse in R

    17/32

    Rolf Andreas Just @Handgemenge Explorative Datenanalyse in R

    Beispiel> plot(rnorm(1000))> dev.copy(svg, file="myfile.svg")svg

    3> dev.off()windows

    2>

  • 8/12/2019 Explorative Datenanalyse in R

    18/32

    Rolf Andreas Just @Handgemenge Explorative Datenanalyse in R

    Beispiel

  • 8/12/2019 Explorative Datenanalyse in R

    19/32

    Rolf Andreas Just @Handgemenge Explorative Datenanalyse in R

    Beispiel> site query txt nums nums V1 V21 178 1792 138 1043 194 1194 175 1705 160 179>

  • 8/12/2019 Explorative Datenanalyse in R

    20/32

    Rolf Andreas Just @Handgemenge Explorative Datenanalyse in R

    Beispiel> head(InsectSprays) count spray1 10 A2 7 A3 20 A4 14 A5 14 A6 12 A> boxplot(count ~ spray, data =InsectSprays, col = "lightgray")>

  • 8/12/2019 Explorative Datenanalyse in R

    21/32

    Rolf Andreas Just @Handgemenge Explorative Datenanalyse in R

    Beispiel

  • 8/12/2019 Explorative Datenanalyse in R

    22/32

    Rolf Andreas Just @Handgemenge Explorative Datenanalyse in R

    Beispiel> str(InsectSprays)'data.frame': 72 obs. of 2 variables:$ count: num 10 7 20 14 14 12 10 23 1720 ... $ spray: Factor w/ 6 levels"A","B","C","D",..: 1 1 1 1 1 1 1 1 1 1 ...>

  • 8/12/2019 Explorative Datenanalyse in R

    23/32

    Rolf Andreas Just @Handgemenge Explorative Datenanalyse in R

    C Beispiel> ?data> data()> data(AirPassengers)> AP AP Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec1949 112 118 132 129 121 135 148 148 136 119 104 1181950 115 126 141 135 125 149 170 170 158 133 114 1401951 145 150 178 163 172 178 199 199 184 162 146 1661952 171 180 193 181 183 218 230 242 209 191 172 1941953 196 196 236 235 229 243 264 272 237 211 180 2011954 204 188 235 227 234 264 302 293 259 229 203 2291955 242 233 267 269 270 315 364 347 312 274 237 278

    1956 284 277 317 313 318 374 413 405 355 306 271 3061957 315 301 356 348 355 422 465 467 404 347 305 3361958 340 318 362 348 363 435 491 505 404 359 310 3371959 360 342 406 396 420 472 548 559 463 407 362 4051960 417 391 419 461 472 535 622 606 508 461 390 432>

  • 8/12/2019 Explorative Datenanalyse in R

    24/32

    Rolf Andreas Just @Handgemenge Explorative Datenanalyse in R

    C Beispiel> str(AirPassengers)

    Time-Series [1:144] from 1949 to 1961: 112 118 132129 121 135 148 148 136 119 ...> class(AP)[1] "ts"> start(AP); end(AP); frequency(AP)[1] 1949 1[1] 1960 12[1] 12> plot(AP)>

  • 8/12/2019 Explorative Datenanalyse in R

    25/32

    Rolf Andreas Just @Handgemenge Explorative Datenanalyse in R

    C Beispiel

  • 8/12/2019 Explorative Datenanalyse in R

    26/32

  • 8/12/2019 Explorative Datenanalyse in R

    27/32

    Rolf Andreas Just @Handgemenge Explorative Datenanalyse in R

    C Beispiel

  • 8/12/2019 Explorative Datenanalyse in R

    28/32

    Rolf Andreas Just @Handgemenge Explorative Datenanalyse in R

    C Beispiel

    > AP.hw plot(AP.hw)>> AP.predict ts.plot(AP, AP.predict, lty=1:2)>

  • 8/12/2019 Explorative Datenanalyse in R

    29/32

    Rolf Andreas Just @Handgemenge Explorative Datenanalyse in R

    C Beispiel

  • 8/12/2019 Explorative Datenanalyse in R

    30/32

    Rolf Andreas Just @Handgemenge Explorative Datenanalyse in R

    C Beispiel

  • 8/12/2019 Explorative Datenanalyse in R

    31/32

    Rolf Andreas Just @Handgemenge Explorative Datenanalyse in R

    Beispiel> head(mtcars) mpg cyl disp hp drat wt qsec vs am gear carbMazda RX4 21.0 6 160 110 3.90 2.620 16.46 0 1 4 4Mazda RX4 Wag 21.0 6 160 110 3.90 2.875 17.02 0 1 4 4Datsun 710 22.8 4 108 93 3.85 2.320 18.61 1 1 4 1Hornet 4 Drive 21.4 6 258 110 3.08 3.215 19.44 1 0 3 1Hornet Sportabout 18.7 8 360 175 3.15 3.440 17.02 0 0 3 2Valiant 18.1 6 225 105 2.76 3.460 20.22 1 0 3 1> pairs(mtcars, main = "mtcars data")> str(mtcars)'data.fme 32 obs. of 11 variables: $ mpg : num 21 21 22.8 21.4 18.7 18.1 14.3 24.4 22.8 19.2 ... $ cyl :num 6 6 4 6 8 6 8 4 4 6 ...$ disp:num 160 160 108 258 360 ...$ hp : num 110 110 93 110 175 105 245 62 95 123 ... $ drat:num 3.9 3.9 3.85 3.08 3.15 2.76 3.21 3.69 3.92 3.92 ...$ wt : num 2.62 2.88 2.32 3.21 3.44 ...$ qsec: num 16.5 17 18.6 19.4 17 ...$ vs : num 0 0 1 1 0 1 0 1 1 1 ...$ am : num 1 1 1 0 0 0 0 0 0 0 ... $ gear: num 4 4 4 3 3 3 3 4 4 4 ...

    $ carb: num 4 4 1 1 2 1 4 2 2 4 ...

  • 8/12/2019 Explorative Datenanalyse in R

    32/32

    Rolf Andreas Just @Handgemenge Explorative Datenanalyse in R

    Beispiel


Recommended