
94 REGRESSION
Input
imagem <-
# a variant of image.default keeping matrix orientation
function (z, zlim = range(z[is.finite(z)]), xlim = c(1,ncol(z)),
ylim = c(1,nrow(z)), col = heat.colors(12),
add = FALSE, xaxs = "i", yaxs = "i", xlab, ylab,main,
breaks, oldstyle=FALSE,
names=TRUE, coloffs=-1, rowoffs=4,...)
{ textnames <-
function (zi, coloffs=-1, rowoffs=NULL) {
# note: image interchanges rows/colums
for (x in (1:dim(zi)[1]) ) # column labels
text(x, ncol(zi)+0.5, rownames(zi)[x], pos=3,
xpd=NA, offs= coloffs, srt=270)
r <- par("usr")[2]
for (y in (1:dim(zi)[2])) # row labels
text(r, y, colnames(zi)[y], pos=4, xpd=NA, offs=rowoffs,srt=0)
} # textnames
zi