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()
  letters.env

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?

Regards,
Xavier

______________________________________________
R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to