R version 2.15.3 (2013-03-01) -- "Security Blanket" Copyright (C) 2013 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i686-pc-linux-gnu (32-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > x <- array(list("f",-2.67,"f",9.67,"f",-6.00,"f",28.33,"f",12.00,"f",-11.30,"f",3.00,"f",-4.67,"f",-5.00,"f",2.33,"f",37.67,"f",7.50,"f",5.00,"f",30.00,"f",15.33,"m",-6.50,"m",-7.33,"m",49.33,"m",-11.00,"m",-8.33,"m",9.00,"m",2.33,"m",-12.30,"m",5.67,"m",-2.00,"m",1.33,"m",-13.00,"m",-5.67,"m",-4.00,"m",2.00),dim=c(2,30),dimnames=list(c('PMent','Exam'),1:30)) > y <- array(NA,dim=c(2,30),dimnames=list(c('PMent','Exam'),1:30)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } There were 30 warnings (use warnings() to see them) > par5 = '2' > par4 = '1' > par3 = '0' > par2 = 'TRUE' > par1 = 'grey' > ylab = 'Degree Grade' > xlab = 'Placement Student' > main = 'Reddy-Moores Placement Data' > par5 <- '2' > par4 <- '1' > par3 <- '0' > par2 <- 'TRUE' > par1 <- 'grey' > #'GNU S' R Code compiled by R2WASP v. 1.2.291 () > #Author: aston2 > #To cite this work: Ian E. Holliday, 2012, Histogram and QQplot (v1.0.6) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/Ian.Holliday/rwasp_Reddy-Moores%20Data%20Boxplot.wasp/ > #Source of accompanying publication: > # > postscript(file="/var/fisher/rcomp/tmp/1iihf1369233248.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > par2<- as.logical(par2) # notches > par3<-as.numeric(par3) # percentage trim > if(par3>45){par3<-45;warning('trim limited to 45%')} > if(par3<0){par3<-0;warning('negative trim makes no sense. Trim is zero.')} > par4 <- as.numeric(par4) #factor column > par5 <- as.numeric(par5) # response column > x <- t(x) > x1<-as.numeric(x[,par5]) # response > f1<-as.character(x[,par4]) # factor > x2<-x1[f1=='no'] > f2 <- f1[f1=='no'] > lotrm<-as.integer(length(x2)*par3/100) > hitrm<-as.integer(length(x2)*(100-par3)/100) > srt<-order(x2,f2) > trmx1<-x2[srt[lotrm:hitrm]] > trmf1<-f2[srt[lotrm:hitrm]] > x3<-x1[f1=='yes'] > f3 <- f1[f1=='yes'] > lotrm<-as.integer(length(x3)*par3/100) > hitrm<-as.integer(length(x3)*(100-par3)/100) > srt<-order(x3,f3) > trmx2<-x3[srt[lotrm:hitrm]] > trmf2<-f3[srt[lotrm:hitrm]] > xtrm<-c(trmx1,trmx2) > ftrm<-c(trmf1,trmf2) > xtrm[1:6] [1] NA NA NA NA NA NA > ftrm[1:6] [1] NA NA NA NA NA NA > r<-boxplot(xtrm~as.factor(ftrm), col=par1, notch=par2, main=main, xlab=xlab, ylab=ylab) Error in boxplot.default(split(mf[[response]], mf[-response]), ...) : invalid first argument Calls: boxplot -> boxplot.formula -> boxplot -> boxplot.default In addition: Warning message: In is.na(rows) : is.na() applied to non-(list or vector) of type 'NULL' Execution halted