From @purd|e@@ @end|ng |rom gm@||@com  Sat May 18 00:46:43 2019
From: @purd|e@@ @end|ng |rom gm@||@com (Abby Spurdle)
Date: Sat, 18 May 2019 10:46:43 +1200
Subject: [Rd] print.<strorageMode>() not called when autoprinting
In-Reply-To: <CAF8bMcatAtZ_LPWZk3QxVQXS5qHA14_j=_tBvGbbH+m0kBYnAQ@mail.gmail.com>
References: <CAF8bMcatAtZ_LPWZk3QxVQXS5qHA14_j=_tBvGbbH+m0kBYnAQ@mail.gmail.com>
Message-ID: <CAB8pepzH-oWR6L+w8R3K-Hy+ESvZXvRYwXiprr37bJ5-cf47Zg@mail.gmail.com>

I don't know the answer to your question.
However, here's a side issue that may be relevant.

Last year, I tried creating my own ecdf object, and redefined the print
method for ecdf.

It worked ok in the console, interactively.
However, when I tried calling the method (with autoprinting) inside an
Sweave document, the stats package method was used instead of my method.
I never determined why this was happening.
However, R check generated a warning later, so I renamed the classes and
methods.


Abs


On Fri, May 17, 2019 at 6:57 AM William Dunlap via R-devel <
r-devel at r-project.org> wrote:
>
> In R-3.6.0 autoprinting was changed so that print methods for the storage
> modes are not called when there is no explicit class attribute.   E.g.,
>
> % R-3.6.0 --vanilla --quiet
> > print.function <- function(x, ...) { cat("Function with argument list
");
> cat(sep="\n    ", head(deparse(args(x)), -1)); invisible(x) }
> > f <- function(x, ...) { sum( x * seq_along(x) ) }
> > f
> function(x, ...) { sum( x * seq_along(x) ) }
> > print(f)
> Function with argument list function (x, ...)
>
> Previous to R-3.6.0 autoprinting did call such methods
> % R-3.5.3 --vanilla --quiet
> > print.function <- function(x, ...) { cat("Function with argument list
");
> cat(sep="\n    ", head(deparse(args(x)), -1)); invisible(x) }
> > f <- function(x, ...) { sum( x * seq_along(x) ) }
> > f
> Function with argument list function (x, ...)
> > print(f)
> Function with argument list function (x, ...)
>
> Was this intentional?
>
> Bill Dunlap
> TIBCO Software
> wdunlap tibco.com
>
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel

	[[alternative HTML version deleted]]



[Rd] print.<strorageMode>() not called when autoprinting
Abby Spurdle