library(languageR) colnames(ratings) [1] "Word" "Frequency" "FamilySize" [4] "SynsetCount" "Length" "Class" [7] "FreqSingular" "FreqPlural" "DerivEntropy" [10] "Complex" "rInfl" "meanWeightRating" [13] "meanSizeRating" "meanFamiliarity" barplot(xtabs(~ratings$Length),xlab="word length",col="grey") mean(ratings$Length) [1] 5.91358 median(ratings$Length) [1] 6 range(ratings$Length) [1] 3 10 min(ratings$Length) [1] 3 max(ratings$Length) [1] 10 library(MASS) detach(package:MASS) library(MASS) truehist(ratings$Length,xlab="word length",col="grey") truehist(ratings$Frequency,xlab="log word frequency",col="grey") truehist(ratings$SynsetCount,xlab="SynsetCount",col="grey") truehist(ratings$FamilySize,xlab="FamilySize",col="grey") truehist(ratings$DerivEntropy,xlab="Derivational entropy",col="grey") par(mfrow=c(3,2)) truehist(ratings$DerivEntropy,xlab="Derivational entropy",col="grey") truehist(ratings$FamilySize,xlab="FamilySize",col="grey") truehist(ratings$FamilySize,xlab="FamilySize",col="grey") par(mfrow=c(1,1)) jpeg("barplot.jpeg",width=400,height=420) truehist(ratings$Frequency,xlab="log word frequency") dev.off() postscript("barplot.ps",horizontal=FALSE,height=6,width=6, +family="Helvetica",paper="special",onefile=FALSE) dev.off() truehist(lexdec$RT,col="lightgrey",xlab="log RT") h=hist(lexdec$RT,freq=FALSE,plot=FALSE) d=density(lexdec$RT) xlimit=range(h$breaks,d$x) ylimit=range(0,h$density,d$y) hist(lexdec$RT,freq=FALSE,xlim=xlimit,ylim=ylimit,main="",xlab="log RT",ylab="",col="lightgrey",border="darkgrey",breaks=seq(5.8,7.6,by=0.1)) lines(d$x,d$y) lines(d) plot(h) plot(d) plot(sort(lexdec$RT),ylab="log RT") plot(quantile(lexdec$RT),xaxt="n",xlab="Quartiles",ylab="log RT") mtext(c("0%","25%","50%","75%","100%"),side=1,at=1:5,line=1,cex=0.7) plot(quantile(lexdec$RT),xaxt="n",xlab="Quartiles",ylab="log RT") mtext(c("0%","25%","50%","75%","100%"),side=1,at=1:5,line=1,cex=0.7) plot(quantile(lexdec$RT,seq(0,1,0.1)), + xaxt="n",xlab="Deciles",ylab="log RT") mtext(paste(seq(0,100,10),rep(%,11),sep=""), エラー: 予想外の 入力 です in "mtext(paste(seq(0,100,10),rep(%,11),sep="")," seq(0,1,0.1) [1] 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 quantile(lexdec$RT,seq(0,1,0.1)) 0% 10% 20% 30% 40% 50% 60% 70% 5.828946 6.122493 6.188264 6.248816 6.297109 6.345636 6.395262 6.459904 80% 90% 100% 6.553933 6.721907 7.587311 paste("a","b","c") [1] "a b c" paste("a","b","c",sep="") [1] "abc" paste(seq(0,100,10),rep=("%",11),sep="") エラー: 予想外の ',' です in "paste(seq(0,100,10),rep=("%"," boxplot(exp(lexdec$RT)) boxplot(lexdec$RT)