データ解析基礎論a 2017 W01で使用するコードなど
data01<-data.frame(score = c(2,4,3,4), dose = c(rep(10,2),rep(100,2)), condition = rep(c('exp','control'),2)) dat01<-read.csv("http://www.matsuka.info/data_folder/temp_data01.txt", header=T) dat02<-read.csv("http://www.matsuka.info/data_folder/temp_data02.txt", header=T, row.name=1) dat03<-read.table("http://www.matsuka.info/data_folder/temp_data03.txt", header=T, row.name=4) dat04<-data.frame(score=c(dat03$x,dat03$y,dat03$z), names=rep(c('sazae','masuo','tarachan'),3), condition=sort(rep(c("x","y","z"),3))) dat<-read.csv("http://www.matsuka.info/data_folder/datWA01.txt", header=T); mean(dat$shoesize[dat$gender == "M"]) mean(dat$shoesize[dat$gender == "F"]) mean(dat$shoesize[dat$h > 180])