library(car) if(par1 == '') par1 <- 0 par1 <- as.numeric(par1) if (par1 < 0) par1 <- 0 bitmap(file='test1.png') if(par1 > 0) { myhist<-hist(x, breaks=par1, col=2,main='Histogram (series X)') } else { myhist <- hist(x, col=2) } dev.off() bitmap(file='test1a.png') if(par1 > 0) { myhist<-hist(y, breaks=par1, col=2,main='Histogram (series Y)') } else { myhist <- hist(y, col=2) } dev.off() bitmap(file='test2.png') qqPlot(x,main='Normal Q-Q Plot (series X)',ylab='Sample Quantiles',xlab='Normal Quantiles') dev.off() bitmap(file='test2a.png') qqPlot(y,main='Normal Q-Q Plot (series Y)',ylab='Sample Quantiles',xlab='Normal Quantiles') dev.off() bitmap(file='test3.png') qqplot(x,y,main='Q-Q Plot (series X vs Y)',ylab='Sample Quantiles of series Y',xlab='Sample Quantiles of series X') qqline(x,y) grid() dev.off() load(file='createtable') a<-table.start() a<-table.row.start(a) a<-table.element(a,'Descriptive Statistics',2,TRUE) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,'mean of X',header=TRUE) a<-table.element(a,mean(x)) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,'standard deviation of X',header=TRUE) a<-table.element(a,sd(x)) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,'mean of Y',header=TRUE) a<-table.element(a,mean(y)) a<-table.row.end(a) a<-table.row.start(a) a<-table.element(a,'standard deviation of Y',header=TRUE) a<-table.element(a,sd(y)) a<-table.row.end(a) a<-table.end(a) table.save(a,file='mytable.tab')
|