From wdun|@p @end|ng |rom t|bco@com  Thu May 16 20:56:45 2019
From: wdun|@p @end|ng |rom t|bco@com (William Dunlap)
Date: Thu, 16 May 2019 11:56:45 -0700
Subject: [Rd] print.<strorageMode>() not called when autoprinting
Message-ID: <CAF8bMcatAtZ_LPWZk3QxVQXS5qHA14_j=_tBvGbbH+m0kBYnAQ@mail.gmail.com>

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]]



[Rd] print.<strorageMode>() not called when autoprinting
William Dunlap