#Daten sind aus Excel in die Zwischenablage kopiert. bmw <- read.table(file("clipboard"),sep="\t",header = T) library(ggplot2) ggplot(bmw,aes(x=preis))+geom_histogram()+facet_wrap(~model)+xlab("Preis")+ylab("Anzahl") names(bmw) tapply(bmw$preis,bmw$model,median) tapply(bmw$preis,bmw$model,mean) tapply(bmw$preis,bmw$model,sd) tapply(bmw$preis,bmw$model,var) tapply((bmw$preis,bmw$model,quantile,probs=0.25) tapply((bmw$preis,bmw$model,quantile,probs=0.75) tapply((bmw$preis,bmw$model,quantile,probs=0.75)-tapply((bmw$preis,bmw$model,quantile,probs=0.25) #gibt das gleiche wie tapply(bmw$preis,bmw$model,IQR) mean(bmw$preis[bmw$model=="x1"])