x <- rnorm(100); y <- rnorm(100)+1; z <- y+rlnorm(100)
pltRCT(1,1,f={plot(x,y,xlab="data with trend");
abline(reg=lm(y~x),lty=2);points(x,z,pch=3)})
nr <- 100; nc <- 8;
data <- as.data.frame(matrix(rnorm(nr*nc),nrow=nr,ncol=nc))
data[,nc] <- data[,nc-2] + 0.3*data[,nc-1] #generate higher correlations
data[,nc-1] <- data[,nc-1] + 0.9*data[,nc]
colnames(data)<-paste("vw",letters[1:nc],sep="")
SplomT(data,mainL="",hist="d",cex.diag=0.6,hist.col="green")
SplomT(data,mainL="",hist="b",adjust=0.4,cex.diag = 0.5)
pltRCT(1, 1, tit="1 by 1 plot", f=plot(y,x-3*y) )
nr <- 25; nc <- 16
pltRCT(1, 2, f={plot(x,y,xlab="my x")
m <- matrix(rnorm(nr*nc),nrow=25,ncol=nc)
pltCharMat(m,cex=0.5,col="red")
})
Run the code above in your browser using DataLab