R version 2.9.0 (2009-04-17) Copyright (C) 2009 The R Foundation for Statistical Computing ISBN 3-900051-07-0 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. > par5 = '970888502a246efc5fe7d1b589dbd499' > par4 = 'norm' > par3 = 'UseR' > par2 = 'UseR' > par1 = '1' > par5 <- '970888502a246efc5fe7d1b589dbd499' > par4 <- 'norm' > par3 <- 'UseR' > par2 <- 'UseR' > par1 <- '1' > #'GNU S' R Code compiled by R2WASP v. 1.0.44 () > #Author: Dr. Ian E. Holliday > #To cite this work: Ian E. Holliday, 2009, YOUR SOFTWARE TITLE (vNUMBER) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/rwasp_YOURPAGE.wasp/ > #Source of accompanying publication: > #Technical description: > library(digest) > if (par1 == '1') { + myran <- runif(1) + if (myran <= 1) { + myseries <- rnorm(150) + answer <- 'norm' + } + if (myran < 0.75) { + myseries <- runif(150) + answer <- 'unif' + } + if (myran < 0.50) { + myseries <- rlnorm(150) + answer <- 'lnorm' + } + if (myran < 0.25) { + myseries <- rchisq(150,5) + answer <- 'chisq' + } + answer <- digest(answer,ser=F) + postscript(file="/var/www/html/rcomp/tmp/1yswu1263057663.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) + myhist<-hist(myseries) + dev.off() + postscript(file="/var/www/html/rcomp/tmp/2m5mm1263057663.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) + mydensity1<-density(myseries,kernel='gaussian',na.rm=TRUE) + plot(mydensity1,main='Gaussian Kernel') + grid() + dev.off() + postscript(file="/var/www/html/rcomp/tmp/3vx0o1263057664.ps",horizontal=F,pagecentre=F,paper="special",width=8.3333333333333,height=5.5555555555556) + mydensity1<-density(myseries,kernel='rectangular',na.rm=TRUE) + plot(mydensity1,main='Rectangular Kernel') + grid() + dev.off() + } null device 1 > > #Note: the /var/www/html/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/www/html/rcomp/createtable") > > if(exists('par4')) { + a<-table.start() + a<-table.row.start(a) + a<-table.element(a,'Your previous answer was',1,TRUE) + a<-table.row.end(a) + a<-table.row.start(a) + if (digest(par4,ser=F) == par5) { + a<-table.element(a,'Correct') + } + if (digest(par4,ser=F) != par5) { + a<-table.element(a,'Incorrect') + } + a<-table.row.end(a) + a<-table.end(a) + table.save(a,file="/var/www/html/rcomp/tmp/4y11y1263057664.tab") + } > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,'Click the right answer that corresponds to the graphical output shown below.',1,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,hyperlink(paste('http://www.wessa.net/Patrick.Wessa/rwasp_test1.wasp?par1=',par1,'&par4=','norm','&par5=',answer,'&par0=1&par2=',par2,'&par3=',par3,'&uid=',par2,'&pwd=',par3,sep=''),'The time series was generated by the normal distribution.','',target='')) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,hyperlink(paste('http://www.wessa.net/Patrick.Wessa/rwasp_test1.wasp?par1=',par1,'&par4=','unif','&par5=',answer,'&par0=1&par2=',par2,'&par3=',par3,'&uid=',par2,'&pwd=',par3,sep=''),'The time series was generated by the uniform distribution.','',target='')) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,hyperlink(paste('http://www.wessa.net/Patrick.Wessa/rwasp_test1.wasp?par1=',par1,'&par4=','lnorm','&par5=',answer,'&par0=1&par2=',par2,'&par3=',par3,'&uid=',par2,'&pwd=',par3,sep=''),'The time series was generated by the lognormal distribution.','',target='')) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,hyperlink(paste('http://www.wessa.net/Patrick.Wessa/rwasp_test1.wasp?par1=',par1,'&par4=','chisq','&par5=',answer,'&par0=1&par2=',par2,'&par3=',par3,'&uid=',par2,'&pwd=',par3,sep=''),'The time series was generated by the chi-square distribution.','',target='')) > a<-table.row.end(a) > a<-table.end(a) > table.save(a,file="/var/www/html/rcomp/tmp/5kz481263057664.tab") > > try(system("convert tmp/1yswu1263057663.ps tmp/1yswu1263057663.png",intern=TRUE)) character(0) > try(system("convert tmp/2m5mm1263057663.ps tmp/2m5mm1263057663.png",intern=TRUE)) character(0) > try(system("convert tmp/3vx0o1263057664.ps tmp/3vx0o1263057664.png",intern=TRUE)) character(0) > > > proc.time() user system elapsed 0.727 0.477 1.484