R version 2.15.1 (2012-06-22) -- "Roasted Marshmallows" Copyright (C) 2012 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(86 + ,36 + ,86 + ,56 + ,103 + ,48 + ,74 + ,32 + ,63 + ,44 + ,82 + ,39 + ,93 + ,34 + ,77 + ,41 + ,111 + ,50 + ,71 + ,39 + ,103 + ,62 + ,89 + ,52 + ,75 + ,37 + ,88 + ,50 + ,84 + ,41 + ,85 + ,55 + ,70 + ,41 + ,104 + ,56 + ,88 + ,39 + ,77 + ,52 + ,77 + ,46 + ,72 + ,44 + ,83 + ,41 + ,110 + ,50 + ,91 + ,50 + ,80 + ,44 + ,91 + ,52 + ,86 + ,54 + ,85 + ,44 + ,107 + ,52 + ,93 + ,37 + ,87 + ,52 + ,84 + ,50 + ,73 + ,36 + ,84 + ,50 + ,86 + ,52 + ,99 + ,55 + ,75 + ,31 + ,87 + ,36 + ,79 + ,49 + ,82 + ,42 + ,95 + ,37 + ,84 + ,41 + ,85 + ,30 + ,95 + ,52 + ,63 + ,30 + ,85 + ,44 + ,86 + ,66 + ,75 + ,48 + ,98 + ,43 + ,71 + ,57 + ,63 + ,46 + ,71 + ,54 + ,84 + ,48 + ,81 + ,48 + ,79 + ,62 + ,63 + ,58 + ,93 + ,58 + ,92 + ,62 + ,83 + ,46 + ,80 + ,34 + ,111 + ,66 + ,92 + ,52 + ,79 + ,55 + ,69 + ,55 + ,83 + ,57 + ,80 + ,56 + ,91 + ,55 + ,97 + ,56 + ,85 + ,54 + ,85 + ,55 + ,99 + ,46 + ,67 + ,52 + ,87 + ,32 + ,68 + ,44 + ,81 + ,46 + ,80 + ,59 + ,93 + ,46 + ,93 + ,46 + ,102 + ,54 + ,104 + ,66 + ,90 + ,56 + ,85 + ,59 + ,92 + ,57 + ,82 + ,52 + ,85 + ,48 + ,89 + ,44 + ,77 + ,41 + ,79 + ,50 + ,76 + ,48 + ,101 + ,48 + ,81 + ,59 + ,92 + ,34 + ,89 + ,46 + ,81 + ,54 + ,77 + ,55 + ,95 + ,54 + ,85 + ,59 + ,81 + ,44 + ,76 + ,54 + ,93 + ,52 + ,104 + ,66 + ,89 + ,44 + ,76 + ,57 + ,77 + ,39 + ,71 + ,60 + ,79 + ,45 + ,89 + ,41 + ,81 + ,50 + ,99 + ,39 + ,81 + ,43 + ,84 + ,48 + ,85 + ,37 + ,111 + ,58 + ,78 + ,46 + ,111 + ,43 + ,78 + ,44 + ,87 + ,34 + ,92 + ,30 + ,93 + ,50 + ,70 + ,39 + ,84 + ,37 + ,75 + ,55 + ,85 + ,39 + ,87 + ,36 + ,75 + ,43 + ,103 + ,50 + ,86 + ,55 + ,77 + ,43 + ,74 + ,60 + ,74 + ,48 + ,76 + ,30 + ,83 + ,43 + ,101 + ,39 + ,83 + ,52 + ,92 + ,39 + ,74 + ,39 + ,87 + ,56 + ,71 + ,59 + ,79 + ,46 + ,83 + ,57 + ,80 + ,50 + ,90 + ,54 + ,80 + ,50 + ,96 + ,60 + ,109 + ,59 + ,98 + ,41 + ,85 + ,48 + ,83 + ,59 + ,86 + ,60 + ,72 + ,56 + ,75 + ,51) + ,dim=c(2 + ,152) + ,dimnames=list(c('MVRBIQ0' + ,'MC30VRB ') + ,1:152)) > y <- array(NA,dim=c(2,152),dimnames=list(c('MVRBIQ0','MC30VRB '),1:152)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } > par3 = 'TRUE' > par2 = '2' > par1 = '1' > ylab = 'Y Variable Name' > xlab = 'X Variable Name' > main = 'Title Goes Here' > cat1 <- as.numeric(par1) # > cat2<- as.numeric(par2) # > intercept<-as.logical(par3) > x <- t(x) > x1<-as.numeric(x[,cat1]) > f1<-as.character(x[,cat2]) > xdf<-data.frame(x1,f1) > (V1<-dimnames(y)[[1]][cat1]) [1] "MVRBIQ0" > (V2<-dimnames(y)[[1]][cat2]) [1] "MC30VRB\r" > names(xdf)<-c('Response', 'Treatment') > if(intercept == FALSE) (lmxdf<-lm(Response ~ Treatment - 1, data = xdf) ) else (lmxdf<-lm(Response ~ Treatment, data = xdf) ) Call: lm(formula = Response ~ Treatment, data = xdf) Coefficients: (Intercept) Treatment31 Treatment32 Treatment34 Treatment36 Treatment37 7.900e+01 -4.000e+00 1.500e+00 9.000e+00 4.250e+00 7.400e+00 Treatment39 Treatment41 Treatment42 Treatment43 Treatment44 Treatment45 4.900e+00 3.750e+00 3.000e+00 8.500e+00 1.673e-15 1.027e-15 Treatment46 Treatment48 Treatment49 Treatment50 Treatment51 Treatment52 4.500e+00 5.800e+00 2.091e-15 1.133e+01 -4.000e+00 8.417e+00 Treatment54 Treatment55 Treatment56 Treatment57 Treatment58 Treatment59 6.750e+00 3.889e+00 9.000e+00 2.000e+00 1.000e+01 5.857e+00 Treatment60 Treatment62 Treatment66 2.750e+00 1.233e+01 2.225e+01 > (aov.xdf<-aov(lmxdf) ) Call: aov(formula = lmxdf) Terms: Treatment Residuals Sum of Squares 2860.87 14113.45 Deg. of Freedom 26 125 Residual standard error: 10.6258 Estimated effects may be unbalanced > (anova.xdf<-anova(lmxdf) ) Analysis of Variance Table Response: Response Df Sum Sq Mean Sq F value Pr(>F) Treatment 26 2860.9 110.03 0.9745 0.5068 Residuals 125 14113.4 112.91 > > #Note: the /var/wessaorg/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/wessaorg/rcomp/createtable") > > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,'ANOVA Model', length(lmxdf$coefficients)+1,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, paste(V1, ' ~ ', V2), length(lmxdf$coefficients)+1,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'means',,TRUE) > for(i in 1:length(lmxdf$coefficients)){ + a<-table.element(a, round(lmxdf$coefficients[i], digits=3),,FALSE) + } > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/1ulnr1351889424.tab") > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,'ANOVA Statistics', 5+1,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, ' ',,TRUE) > a<-table.element(a, 'Df',,FALSE) > a<-table.element(a, 'Sum Sq',,FALSE) > a<-table.element(a, 'Mean Sq',,FALSE) > a<-table.element(a, 'F value',,FALSE) > a<-table.element(a, 'Pr(>F)',,FALSE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, V2,,TRUE) > a<-table.element(a, anova.xdf$Df[1],,FALSE) > a<-table.element(a, round(anova.xdf$'Sum Sq'[1], digits=3),,FALSE) > a<-table.element(a, round(anova.xdf$'Mean Sq'[1], digits=3),,FALSE) > a<-table.element(a, round(anova.xdf$'F value'[1], digits=3),,FALSE) > a<-table.element(a, round(anova.xdf$'Pr(>F)'[1], digits=3),,FALSE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a, 'Residuals',,TRUE) > a<-table.element(a, anova.xdf$Df[2],,FALSE) > a<-table.element(a, round(anova.xdf$'Sum Sq'[2], digits=3),,FALSE) > a<-table.element(a, round(anova.xdf$'Mean Sq'[2], digits=3),,FALSE) > a<-table.element(a, ' ',,FALSE) > a<-table.element(a, ' ',,FALSE) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/2cu8h1351889424.tab") > postscript(file="/var/wessaorg/rcomp/tmp/3sx2k1351889424.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) > boxplot(Response ~ Treatment, data=xdf, xlab=V2, ylab=V1) Warning message: In title(xlab = "MC30VRB\r", ylab = "MVRBIQ0") : font width unknown for character 0xd > dev.off() null device 1 > if(intercept==TRUE){ + thsd<-TukeyHSD(aov.xdf) + postscript(file="/var/wessaorg/rcomp/tmp/4d5yp1351889424.ps",horizontal=F,onefile=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) + plot(thsd) + dev.off() + } null device 1 > if(intercept==TRUE){ + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Tukey Honest Significant Difference Comparisons', 5,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + a<-table.element(a, ' ', 1, TRUE) + for(i in 1:4){ + a<-table.element(a,colnames(thsd[[1]])[i], 1, TRUE) + } + a<-table.row.end(a) + for(i in 1:length(rownames(thsd[[1]]))){ + a<-table.row.start(a) + a<-table.element(a,rownames(thsd[[1]])[i], 1, TRUE) + for(j in 1:4){ + a<-table.element(a,round(thsd[[1]][i,j], digits=3), 1, FALSE) + } + a<-table.row.end(a) + } + a<-table.end(a) + table.save(a,file="/var/wessaorg/rcomp/tmp/5pa821351889424.tab") + } > if(intercept==FALSE){ + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'TukeyHSD Message', 1,TRUE) + a<-table.row.end(a) + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Must Include Intercept to use Tukey Test ', 1, FALSE) + a<-table.row.end(a) + a<-table.end(a) + table.save(a,file="/var/wessaorg/rcomp/tmp/6a6l01351889424.tab") + } > library(car) Loading required package: MASS Loading required package: nnet > lt.lmxdf<-levene.test(lmxdf) Warning message: 'levene.test' is deprecated. Use 'leveneTest' instead. See help("Deprecated") and help("car-deprecated"). > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,'Levenes Test for Homogeneity of Variance', 4,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,' ', 1, TRUE) > for (i in 1:3){ + a<-table.element(a,names(lt.lmxdf)[i], 1, FALSE) + } > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Group', 1, TRUE) > for (i in 1:3){ + a<-table.element(a,round(lt.lmxdf[[i]][1], digits=3), 1, FALSE) + } > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,' ', 1, TRUE) > a<-table.element(a,lt.lmxdf[[1]][2], 1, FALSE) > a<-table.element(a,' ', 1, FALSE) > a<-table.element(a,' ', 1, FALSE) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/wessaorg/rcomp/tmp/7fnxc1351889424.tab") > > try(system("convert tmp/3sx2k1351889424.ps tmp/3sx2k1351889424.png",intern=TRUE)) character(0) > try(system("convert tmp/4d5yp1351889424.ps tmp/4d5yp1351889424.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 5.399 0.296 5.675