Re: [R] Print methods

2009-11-09 Thread Remko Duursma
Because print.foo is not defined if you only include the function "g" in your namespace. remko - Remko Duursma Post-Doctoral Fellow Centre for Plants and the Environment University of Western Sydney Hawkesbury Campus Richmond NSW 2753 Dept of B

[R] Print methods

2009-11-09 Thread Doran, Harold
I've built a package that contains only two functions for a test run. They are: g <- function(x){ x <- x^2 class(x) <- "foo" x } print.foo <- function(x, ...){ cat("This is a test:\n") cat(x, "\n") invisible(x) } Simply testing these functi