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. > par4 = '26' > par3 = 'ac112d0832171b2877f63c669bf3d303' > par2 = 'wnga' > par1 = '119215010_0.0675312294624746_Wed May 22 10:28:43 2013' > par4 <- '26' > par3 <- 'ac112d0832171b2877f63c669bf3d303' > par2 <- 'wnga' > par1 <- '119215010_0.0675312294624746_Wed May 22 10:28:43 2013' > #'GNU S' R Code compiled by R2WASP v. 1.2.291 () > #Author: aston2 > #To cite this work: I. Holliday, 2012, MC Mock Q11 (v1.0.2) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/Ian.Holliday/rwasp_mcq201011.wasp/ > #Source of accompanying publication: > # > library(digest) > par4 <- as.numeric(par4) > if(exists('par2')) { + if (par2 != 'wnga') { + if (digest(par2,ser=F) == par3) { + par4 = par4 + 4 + } + if (digest(par2,ser=F) != par3) { + par4 = par4 - 2 + } + } + if (par2 == 'wnga') { + } + } NULL > > #Note: the /var/fisher/rcomp/createtable file can be downloaded at http://www.wessa.net/cretab > load(file="/var/fisher/rcomp/createtable") > > a<-table.start() > a<-table.row.start(a) > a<-table.element(a,'This is the end of the MC exam. Please, write the hash code on your exam paper.',2,TRUE) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.element(a,'Hash Code',1,TRUE) > a<-table.element(a,digest(paste(par1,'_',par4,sep=''),ser=F)) > a<-table.row.end(a) > a<-table.row.start(a) > a<-table.end(a) > table.save(a,file="/var/fisher/rcomp/tmp/1re0v1369233723.tab") > > > > proc.time() user system elapsed 0.287 0.078 0.342