Learn R Programming

CARrampsOcl (version 0.1.4)

plotem: Utility function used by plotting functions.

Description

Utility function used by plotting function.

Usage

plotem(range1, range2, objname, range3, nrow, numcols, col, rev.inds, breaks, title, sub)

Arguments

range1
indices for first plotting dimension
range2
indices for second plotting dimension
objname
name of output object from CARrampsOcl.fit to be plotted
range3
which coordinate to plot at
nrow
number of rows in matrix format for "image"
numcols
Number of shades from color palette.
col
Color palette.
rev.inds
Reverse indices on either axis?
breaks
Cut points for quantitative variable determining color shades.
title
Titles for each of the two plots
sub
Subtitle

Value

  • Produces an image plot

Examples

Run this code
##---- Should be DIRECTLY executable !! ----
##-- ==>  Define data, use random,
##--	or do  help(data=index)  for the standard data sets.

## The function is currently defined as
function (range1, range2, objname, range3, nrow, numcols, col, 
    rev.inds, breaks, title, sub) 
{
    inds1 <- range1
    inds2 <- range2
    if (rev.inds[1]) 
        inds1 <- rev(inds1)
    if (rev.inds[2]) 
        inds2 <- rev(inds2)
    image.plot(range1, range2, matrix(objname$y[range3], nrow = nrow)[inds1, 
        inds2], col = col, breaks = breaks, xlab = "", ylab = "", 
        main = title[1], sub = sub)
    image.plot(range1, range2, matrix(objname$phi$phimean[range3], 
        nrow = nrow)[inds1, inds2], col = col, xlab = "", ylab = "", 
        breaks = breaks, main = title[2], sub = sub)
  }

Run the code above in your browser using DataLab