s-news
[Top] [All Lists]

[S] setMethod

To: s-news@wubios.wustl.edu
Subject: [S] setMethod
From: Mika Nakazono <mika@msi.co.jp>
Date: Tue, 27 Apr 1999 13:08:16 +0900 (JST)
Sender: owner-s-news@wubios.wustl.edu
Dear S-users,

Now I'm reading "PROGRAMMING WITH DATA", with accessing to S-PLUS 5.0 
on Solaris. Then, I have some question. 
As mentioned on page 34, I tried to implement a method for a function named 
"whatis",

>setMethod("whatis","vector",function(object)
        paste(class(object),"vector of length", length(object))

But I got an error message as a result, 

>Problem in initMethods(where): database ".Data" has no meta-database; can't be
>used for methods/classes

so, I tried to attach my own directory,

>attach("method")
>setMethod("whatis","vector",function(object)
        paste(class(object),"vector of length", length(object),2)

but the same message I received.
Because I do not have a write permission to S-PLUS library directory, 
I cannot do something like,

>library(data)
>setMethod("whatis","vector",function(object)
        paste(class(object),"vector of length", length(object),2)


What is the best way to solve this problem?
What is the "meta-database"?

Thank you, 
Mika

Mika Nakazono
Mathmatical Systems Inc., Japan
E-MAIL:mika@msi.co.jp
URL:http//www.msi.co.jp/splus/
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu.  To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message:  unsubscribe s-news

<Prev in Thread] Current Thread [Next in Thread>