# 1. přednáška rm(list=ls()) data(Kojeni) attach(Kojeni) hist(vek.m,seq(17,38,by=3),col="yellow") hist(vek.m,seq(17,38,by=3),col="yellow",main="",xlab="",ylab="") hist(vek.m) detach(Kojeni) # (Tolary = read.csv2("data/tolary.txt")) attach(Tolary) hist(tolary) hist(tolary,freq=FALSE) breaks = c(10:13,17,21,31,51)-.5 hist(tolary,breaks=breaks,col="yellow",main="",xlab="",ylab="") # quantile(vek.m,probs=c(1/4,2/4,3/4)) quantile(vek.m,probs=1:3/4) boxplot(vek.m) boxplot(tolary) # mean(vek.m) mean(tolary) (četnosti = table(tolary)) (tolaryHvězdička = unique(sort(tolary))) weighted.mean(tolaryHvězdička,četnosti) mean(vek.m,trim=0.1)