Dear Readers,
Hi All,

to drive my R knowlegde a bit further I followed the advice of some of you 
by reading Chambers: Programming with data.

I tried some examples from the book:

-- cut --

setClass("track", representation (x = "numeric",
                                    y = "numeric"))

track <- function(x, y) {
  # an object representing measurements 'y', tracked at positions 'x'
  x <- as(x, "numeric")
  y <- as(y, "numeric")
  if(length(x) != length(y)) {
    stop("x, y should have equal length!")
  }
  new("track", x = x, y = y)
}

dumpMethod("track", "track")

setMethod("show", "track",
          function(object) {
            xy = rbind(object@x, object@y)
            dimanmes(xy) = list(c("x", "y"),
                                1:ncol(y))
            show(xy)
          })

setMethod("plot",
          signature(x = "track", y = "missing"),
          function(x, y, ...)
            plot(unclass(x), xlab = "Position", ylab = "Value", ...)
          )

dumpMethod("plot", "track")

-- cut --

Where do I find the dumped data? Is it in a single file or is every dump 
stored in a separate file? Where is it stored on my drive?

Kind regards

Georg

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to