Skip to content
Prev 8967 / 63424 Next

class(x) <- error

Paul Gilbert wrote:
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?