From statwy at stat.nus.edu.sg  Wed Aug  6 07:26:53 2003
From: statwy at stat.nus.edu.sg (statwy@stat.nus.edu.sg)
Date: Wed Aug  6 06:26:32 2003
Subject: [Rd] S4 methods bug in naming of slots (PR#3665)
Message-ID: <200308060426.h764QrJH020539@pubhealth.ku.dk>

Hello,

I am using R 1.7.1 on a Redhat Linux machine, version 7.3.
The following works fine: 

setClass("ok", representation(
      "A"       = "matrix",
      "Cmatrix" = "matrix"))

new("ok",
    "A" = diag(4),
    "Cmatrix" = diag(4))

But the following doesn't work:

setClass("notok", representation(
      "A" = "matrix",
      "C" = "matrix"))

new("notok",
    "A" = diag(4),
    "C" = diag(4))

It says

> new("notok",
+    "A" = diag(4),
+    "C" = diag(4))
Error in methodsPackageMetaName("C", name) :
        The name of the object (e.g,. a class or generic function) to find in the meta-data must be a single string (got an object of class "matrix")

Can this bug be fixed? It doesn't work in the Windows version either. 
Thanks in advance.

Thomas


[Rd] S4 methods bug in naming of slots (PR#3665)
statwy@stat.nus.edu.sg