[Rd] attach 'name' argument ignored with a file?

From: Xavier Robin <Xavier.Robin_at_unige.ch>
Date: Thu, 22 Dec 2011 14:39:01 +0100

Dear experRts,

I have the feeling that the 'name' argument to the attach function is ignored when 'what' is a file name. Here is an example:

  save(letters, file="letters.RData")
  letters.env <- attach("letters.RData", name="letters")   search()

The name on the search path is "file:letters.RData". I would expect it to be "letters"...
Tested today with R-latest.

Is it by design? From the doc I read:

> name name to use for the attached database.
> ...
> The name given for the attached environment will be used by search and can be used as the argument to as.environment.

I don't see why that would be restricted when 'what' is a file name.

What do you think about it? Is it a bug or did I mis-read the doc?


R-devel_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Fri 23 Dec 2011 - 08:44:07 GMT

This quarter's messages: by month, or sorted: [ by date ] [ by thread ] [ by subject ] [ by author ]

All messages

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 23 Dec 2011 - 13:50:20 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive