lehrkraefte:ks:ffstat2223

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Last revision Both sides next revision
lehrkraefte:ks:ffstat2223 [2024/02/23 09:45]
Simon Knaus
lehrkraefte:ks:ffstat2223 [2024/03/08 13:21]
Simon Knaus [Lektion 04]
Line 570: Line 570:
   * Kapitel 7 insb. Kapitel 7.1   * Kapitel 7 insb. Kapitel 7.1
 <hidden R-Code> <hidden R-Code>
-<file code> +<code code> 
-#Daten sind aus Excel in die Zwischenablage kopiert. +cardata <- read.table(readClipboard(),header T,sep=';'
-bmw <- read.table(file("clipboard"),sep="\t",header T+head(cardata
-library(ggplot2+unique(cardata$model
-library(plyr+x5 <- cardata$model == "x5" 
-ggplot(bmw,aes(x=preis))+geom_histogram()+facet_wrap(~model)+xlab("Preis")+ylab("Anzahl"+x5  #ein Vektor mit TRUE and FALSE 
-names(bmw+x5preise <- cardata$preis[x5] 
-ddply(bmw,.(model),summarise,median(preis)) +mean(x5preise) 
-ddply(bmw,.(model),summarise,mean(preis)) +median(x5preise) 
-ddply(bmw,.(model),summarise,sd(preis)) +sd(x5preise
-ddply(bmw,.(model,zylinder),summarise,mean(preis)) +quantile(x5preise, 0.25#25% Quantil 
-#oder +quantile(x5preisec(0.250.75)) #25% Quantil und 75% Quantil 
-tapply(bmw$preis,bmw$model,median+ 
-tapply(bmw$preis,bmw$model,mean) +library(plyr)  # Zusatzpaket 'plyr' laden (vorgänig mit install.packages('plyr'installieren) 
-tapply(bmw$preis,bmw$model,sd+head(cardata # Erste Zeilen anzeigen 
-tapply(bmw$preis,bmw$model,var) +`?`(ddply  # Hilfe zu ddply 
-tapply((bmw$preis,bmw$model,quantile,probs=0.25) +
-tapply((bmw$preis,bmw$model,quantile,probs=0.75) +ddply(cardata, .(model), summarise, preis = mean(preis))  # Mittelwert des Preises nach Modell anzeigen 
-tapply((bmw$preis,bmw$model,quantile,probs=0.75)-tapply((bmw$preis,bmw$model,quantile,probs=0.25) +ddply(cardata, .(model), summarise, preis median(preis))  # Median des Preises nach Modell anzeigen 
-#gibt das gleiche wie  +ddply(cardata, .(model, zylinder), summarise, preis = mean(preis))  # Mittelwert des Preises nach Modell und Anzahl Zylinder anzeigen 
-tapply(bmw$preis,bmw$model,IQR) +</code>
-mean(bmw$preis[bmw$model=="x1"]+
-</file>+
 </hidden> </hidden>
  
  • lehrkraefte/ks/ffstat2223.txt
  • Last modified: 2024/03/22 15:28
  • by Simon Knaus