lplot2g:

Usage Arguments Examples

Usage

1
lplot2g(x1, y1, x2, y2, fr = 0.8, est = tmean, xlab = "X", ylab = "Y", xout = FALSE, eout = FALSE, outfun = out, ...)

Arguments

x1
y1
x2
y2
fr
est
xlab
ylab
xout
eout
outfun
...

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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
##---- 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 (x1, y1, x2, y2, fr = 0.8, est = tmean, xlab = "X", 
    ylab = "Y", xout = FALSE, eout = FALSE, outfun = out, ...) 
{
    m1 <- elimna(cbind(x1, y1))
    if (eout && xout) 
        stop("Can't have both eout and xout = F")
    if (eout) {
        flag <- outfun(m1, plotit = FALSE, ...)$keep
        m1 <- m1[flag, ]
    }
    if (xout) {
        flag <- outfun(m1[, 1], plotit = FALSE, ...)$keep
        m1 <- m1[flag, ]
    }
    x1 <- m1[, 1]
    y1 <- m1[, 2]
    m2 <- elimna(cbind(x2, y2))
    if (eout) {
        flag <- outfun(m2, plotit = FALSE, ...)$keep
        m2 <- m2[flag, ]
    }
    if (xout) {
        flag <- outfun(m2[, 1], plotit = FALSE, ...)$keep
        m2 <- m2[flag, ]
    }
    x2 <- m2[, 1]
    y2 <- m2[, 2]
    flag = order(x1)
    x1 = x1[flag]
    y1 = y1[flag]
    flag = order(x2)
    x2 = x2[flag]
    y2 = y2[flag]
    temp1 <- lplot(x1, y1, pyhat = TRUE, plotit = FALSE)$yhat.values
    temp2 <- lplot(x2, y2, pyhat = TRUE, plotit = FALSE)$yhat.values
    plot(c(x1, x2), c(y1, y2), type = "n", xlab = xlab, ylab = ylab)
    points(x1, y1)
    points(x2, y2, pch = "+")
    lines(x1, temp1)
    lines(x2, temp2, lty = 2)
  }

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