y <- c(4.8,4.2,4.6,4.8,4.6,6.2,4.4,4.2,4,4.2,4.4,5.2,3.8,5.2,4.6,4.2,5.4,4.6,4.4,5,4.8,6.2,5.2,4.6,4.6,4.2,4,4.6,4.6,5,4.6,5.6,4,3.8,5.8,4.2,3.4,3.8,4.8,4.2,4,5,5,4.6,5,3.8,5,4.8,5,4.2,4.8,4.6,5,5,4,4,3.2,5.2,4.6,3.6,4.8,4.8,4.8,4,5,4.4,5.2,4,5.6,7,4.2,4,5.2,4.2,4.6,4.8,4.8,4,4.4,4,4.6,4.2,4,3.8,6,5,5.4,4.2,5.4,5.6,5.2,4.4,4.4,4.2,4,4.2)
x <- c(5,5.4,5.6,5.6,5.4,6,4,4.2,4.6,4.2,4.2,4.666666667,3.6,5,4.6,4,5.8,5.8,4,5.4,4.8,5.8,5.4,4.8,4.6,4.6,4,4,4.8,5,4,5.2,4,4.4,5.6,4.6,2.2,4,4.6,4.2,4,5,5,4.8,5,3.8,4.6,4.2,5,4,5.2,4.8,4.2,5,4.2,4,3.2,6.2,5.6,4.6,5.2,6,4.8,4,4.4,4.4,4.8,4.6,6.4,6,4.2,4,5.2,4.4,4.6,4.8,4.2,4,4.2,4,5,4,5.6,4,5.8,4.4,5.4,4.2,5.2,4.6,5.2,4.4,4.2,4,3.8,5.6)
par2 = 'two.sided'
par1 = 'pearson'
ylab = 'specmemmean'
xlab = 'compmemomean'
#'GNU S' R Code compiled by R2WASP v. 1.0.44 ()
#Author: Dr. Ian E. Holliday
#To cite this work: Ian E. Holliday, 2009, Pregnancy and Cognition (v0.1) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_Pregnancy and cognition.wasp#output/
#Source of accompanying publication: 
#Technical description: 
postscript(file="/var/www/html/rcomp/tmp/1xe8k1257256746.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) 
plot(x,y, xlab=xlab, ylab=ylab)
abline(coef=(lm(y ~ x))$coeff, col='red')
ctp<-cor.test(x, y, use='pair', method='pearson')
legend('bottomright', c('cor =', as.character(round(ctp$estimate, digits=4))))
dev.off()
sw1<-shapiro.test(x)
sw2<-shapiro.test(y)
cxy<-cor.test(x, y, method=par1)

#Note: the /var/www/html/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab
load(file="/var/www/html/rcomp/createtable")

a<-table.start()
a<-table.row.start(a)
a<-table.element(a,paste('Shapiro Test ', xlab),3,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Statistic W',header=TRUE)
a<-table.element(a,'probability',header=TRUE)
a<-table.element(a,hyperlink('http://www.xycoon.com','ShapiroWilks Test','ShapiroWilks Test'))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,round(sw1$statistic, digits=4))
a<-table.element(a,round(sw1$p.value, digits=4))
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file="/var/www/html/rcomp/tmp/2cufg1257256746.tab") 
a<-table.start()
a<-table.row.start(a)
a<-table.element(a, paste('Shapiro Test ', ylab),3,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Statistic W',header=TRUE)
a<-table.element(a,'probability',header=TRUE)
a<-table.element(a,hyperlink('http://www.xycoon.com','ShapiroWilks Test','ShapiroWilks Test'))
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,round(sw2$statistic, digits=4))
a<-table.element(a,round(sw2$p.value, digits=4))
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file="/var/www/html/rcomp/tmp/3eepn1257256746.tab") 
a<-table.start()
a<-table.row.start(a)
a<-table.element(a,'Correlation Test X-Y',3,TRUE)
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,'Statistic',header=TRUE)
a<-table.element(a,'Value',header=TRUE)
a<-table.element(a,'probability',header=TRUE)
a<-table.element(a,'Method')
a<-table.element(a,'alternative')
a<-table.row.end(a)
a<-table.row.start(a)
a<-table.element(a,names(cxy$estimate))
a<-table.element(a,round(cxy$estimate, digits=4))
a<-table.element(a,round(cxy$p.value, digits=4))
a<-table.element(a,cxy$method)
a<-table.element(a,cxy$alternative)
a<-table.row.end(a)
a<-table.end(a)
table.save(a,file="/var/www/html/rcomp/tmp/4nvf91257256746.tab") 

system("convert tmp/1xe8k1257256746.ps tmp/1xe8k1257256746.png")

