interplot:

Usage Arguments Examples

Usage

1
interplot(J, K, x, locfun = mean, locvec = NULL, g1lev = NULL, g2lev = NULL, type = c("l", "p", "b"), xlab = "Fac 1", ylab = "means", trace.label = "Fac 2", ...)

Arguments

J
K
x
locfun
locvec
g1lev
g2lev
type
xlab
ylab
trace.label
...

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
##---- 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 (J, K, x, locfun = mean, locvec = NULL, g1lev = NULL, 
    g2lev = NULL, type = c("l", "p", "b"), xlab = "Fac 1", ylab = "means", 
    trace.label = "Fac 2", ...) 
{
    if (is.null(locvec)) 
        locvec = lloc(x, est = locfun)
    if (is.null(g1lev[1])) {
        g1 = c(rep(1, K))
        for (j in 2:J) g1 = c(g1, rep(j, K))
    }
    if (!is.null(g1lev)) {
        g1 = c(rep(g1lev[1], K))
        for (j in 2:J) g1 = c(g1, rep(g1lev[j], K))
    }
    g1 = as.factor(g1)
    if (is.null(g2lev[1])) 
        g2 = as.factor(rep(c(1:K), J))
    if (!is.null(g2lev[1])) 
        g2 = as.factor(rep(g2lev, J))
    g2 = as.factor(g2)
    interaction.plot(g1, g2, locvec, xlab = xlab, ylab = ylab, 
        trace.label = trace.label)
  }

musto101/wilcox_R documentation built on May 23, 2019, 10:52 a.m.