File: plot.lowess.R

package info (click to toggle)
gplots 3.3.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 9,580 kB
  • sloc: makefile: 2
file content (28 lines) | stat: -rw-r--r-- 668 bytes parent folder | download | duplicates (6)
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
plotLowess <- function (formula, data=parent.frame(), ..., subset=parent.frame(),
                        col.lowess="red",
                        lty.lowess=2  )
{
  m <- match.call(expand.dots=TRUE)
  m[[1]] <- as.name("plot")
  eframe <- parent.frame()
  eval(m, eframe)
  m[[1]] <- as.name("lowess")
  lw <- eval(m, eframe)
  lines(lw, col=col.lowess, lty=lty.lowess)
  grid()

  invisible(lw)
}

plot.lowess <- function(x, y, ..., col.lowess="red", lty.lowess=2)
{
  m <- x$call
  m[[1]] <- quote(plot)
  m <- as.call(append(as.list(m), list(...)))
  eval(m,  envir = parent.frame())

  lines(x$x, x$y, col=col.lowess, lty=lty.lowess)
  grid()

  invisible(x)
}