From jmc@research.bell-labs.com  Wed Feb 26 20:10:03 2003
From: jmc@research.bell-labs.com (John Chambers)
Date: Wed Feb 26 20:10:03 2003
Subject: [Rd] class(x) <- error
References: <3E5C3DEB.802D2AFB@bank-banque-canada.ca> <3E5D0404.6000502@stat.auckland.ac.nz>
Message-ID: <3E5D10E5.4EC38AB7@research.bell-labs.com>

The original report was correct.

I fixed the problem & had sent a message to r-devel to that effect, but
we may have been having delays or other problems with our mailer.

Thanks again for the report, Paul.

John Chambers


Ross Ihaka wrote:
> 
> Paul Gilbert wrote:
> > I think this is an error in r-devel:
> >
> > R : Copyright 2003, The R Development Core Team
> > Version 1.7.0 Under development (unstable) (2003-02-25)
> > ...
> >  > x <- matrix(1:9,3,3)
> >  > class(x)<-c("a", "matrix")
> >  > class(x)
> > [1] "a"      "matrix"
> >  > class(x)<-class(x)[-1]
> >  > class(x)
> > [1] "a"      "matrix"  # should be "matrix"
> >  > class(x)<-"matrix"
> >  > class(x)
> > [1] "a"      "matrix"  # should be "matrix"
> 
> As of this minute I am seeing the correct behaviour under RedHat 7.3 Linux.
> 
> R : Copyright 2003, The R Development Core Team
> Version 1.7.0 Under development (unstable) (2003-02-26)
> ...
>  > x <- matrix(1:9,3,3)
>  > class(x)<-c("a", "matrix")
>  > class(x)
> [1] "a"      "matrix"
>  > class(x)<-class(x)[-1]
>  > class(x)
> [1] "matrix"
>  > class(x)<-"matrix"
>  > class(x)
> [1] "matrix"
> 
> Have you redefined class<- somehow?
> 
> --
> Ross Ihaka                         Email:  ihaka@stat.auckland.ac.nz
> Department of Statistics           Phone:  (64-9) 373-7599 x 85054
> University of Auckland             Fax:    (64-9) 373-7018
> Private Bag 92019, Auckland
> New Zealand
> 
> ______________________________________________
> R-devel@stat.math.ethz.ch mailing list
> http://www.stat.math.ethz.ch/mailman/listinfo/r-devel

-- 
John M. Chambers                  jmc@bell-labs.com
Bell Labs, Lucent Technologies    office: (908)582-2681
700 Mountain Avenue, Room 2C-282  fax:    (908)582-3340
Murray Hill, NJ  07974            web: http://www.cs.bell-labs.com/~jmc



[Rd] class(x) <- error
John Chambers