s-news
[Top] [All Lists]

Re: behaviour of library function

To: <Glenn.Treacy@ilim.com>
Subject: Re: behaviour of library function
From: Prof Brian Ripley <ripley@stats.ox.ac.uk>
Date: Wed, 28 Nov 2001 11:25:29 +0000 (GMT)
Cc: <s-news@lists.biostat.wustl.edu>
In-reply-to: <F12D043C8E69D211B90A0010E36079C201E95C8D@mail.ilim.com>
On Wed, 28 Nov 2001 Glenn.Treacy@ilim.com wrote:

> Hi,
>
> I am using S+2000 on NT4 R3 and puzzled at the behaviour of the library
> function. I have two libraries, one called String and the other
> String_restored resident in a folder at c:\Transfer. When I execute
> library(section=String_restored,first=F,lib.loc="c:\\Transfer") I find that
> the library String has been attached not String_restored. If I remove the
> String library and run the same command I get an erro telling me that 'No
> section "String" in the library directories etc. etc.'. It seems that the
> underscore character is causing problems. The hypen character seems to cause
> the same problem. Can anyone explain why this is happening and what the
> rules are fo acceptable library names?

The rules are same as for any other S object: an argument is an S object
or the name of one.  Since the (Unix) help page says

   section
          character string or name giving the name of the section of the
          library to attach.

you can quote non-standard names like "String_restored" on Unix, and AFAIK
on S+2000.  You are first assigning `restored' to `String' and then
trying to open "String".

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


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