-----Original Message-----
From: r-devel-bounces at r-project.org
[mailto:r-devel-bounces at r-project.org] On Behalf Of Tom Short
Sent: Sunday, April 12, 2009 4:00 PM
To: r-devel at r-project.org
Subject: [Rd] Simple class with an automatic printing issue
I don't understand the following behavior for a simple S3 class. The
auto-printing at the command line
doesn't behave as I expect. I'm probably missing something,
but it might be
a bug.
print.testClass <- function(x, ...) cat("Class:", class(x),
structure(1, class = "testClass")
print(1 * structure(1, class = "testClass"))
1 * structure(1, class = "testClass") # why doesn't
auto-printing call
print.testClass here?
[1] 1
attr(,"class")
[1] "testClass"
structure(1, class = "testClass") * 1
Class: testClass : 1
platform i386-pc-mingw32
arch i386
os mingw32
system i386, mingw32
status RC
major 2
minor 9.0
year 2009
month 04
day 10
svn rev 48318
language R
version.string R version 2.9.0 RC (2009-04-10 r48318)
[[alternative HTML version deleted]]