s-news
[Top] [All Lists]

Re: [S] setMethod

To: Mika Nakazono <mika@msi.co.jp>
Subject: Re: [S] setMethod
From: Prof Brian D Ripley <ripley@stats.ox.ac.uk>
Date: Tue, 27 Apr 1999 07:19:32 +0100 (BST)
Cc: s-news@wubios.wustl.edu
In-reply-to: <199904270408.NAA07688@quux.msi.co.jp>
Sender: owner-s-news@wubios.wustl.edu
On Tue, 27 Apr 1999, Mika Nakazono wrote:

> 
> 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

[...]

> What is the best way to solve this problem?

You did not create your working directory properly (with Splus5 CHAPTER).

> What is the "meta-database"?

Your .Data should looks something like

auk% ls -aR S5work
./      ../     .Data/

/home/ripley/S5work/.Data:
./           ../          .Audit       .Last.value  __Help/      __Meta/

/home/ripley/S5work/.Data/__Help:
./   ../

/home/ripley/S5work/.Data/__Meta:
./   ../

Metadata are objects stored in .Data/__Meta, containing information about
classes, etc.  Try the index of `Programming with Data' for pointers to
more information.


-- 
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

-----------------------------------------------------------------------
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>