Last chance! 50% off unlimited learning
Sale ends in
pltCharMat
uses output from charMat
to plot numerical matrices as characters.
- pltRCT
executes a (series of) plotting function(s) under the control of some useful switches, may be useful in source
.
- histRCT
creates a (series of) histogram(s), uses pltRCT
.
- SplomT
creates a scatterplot matrix,pltCharMat(m,tit)
pltRCT(rows, cols, tit="", f = function(x) 0, cex = 1.5,
reset = TRUE, outer = TRUE, oma = c(2, 2, 4, 2), mar = c(4, 4, 2, 1))
histRCT(data, rows = round(sqrt(ncol(data))),
cols = ceiling(ncol(data)/rows), breaks = "Sturges", mainL = deparse(substitute(data)), mainC = colnames(eval(substitute(data))))
SplomT(data, mainL = deparse(substitute(data)), xlabL = "",
hist = "h", adjust = 1, hist.col = trellis.par.get("strip.background")$col[5], cex.diag = 1, h.diag=0.4, colYonX = "red", colXonY = "blue", ...)
expression
, plotmath
will be used.tit
rows, cols
be restored after execution. See note
postscript
, because this would try to open another ps device without closing the old one!x <- rnorm(100); y <- rnorm(100)+1; z <- y+rlnorm(100)
pltRCT(1,1,f={plot(x,y,xlab="this is my x");abline(reg=lm(y~x),lty=2);plot(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)
pltHist(data)
pltRCT(1, 1, tit="1 by 2 plot", f=plot(y,x-3*y) )
pltRCT(1, 2, f={plot(x,y,xlab="my x"); abline(reg=lm(y~x),lty=2);plot(x,z,pch=3)})
m <- matrix(rnorm(500),nrow=50,ncol=10)
pltCharMat(m,"Random example")
Run the code above in your browser using DataLab