[R] How we can open the results are saved

Prof Brian Ripley ripley at stats.ox.ac.uk
Mon Jun 14 20:37:54 CEST 2010


On Mon, 14 Jun 2010, Patrick Burns wrote:

> On 14/06/2010 17:50, jim holtman wrote:
>> load('adresse/filename.R')
>
> Or:
>
> attach('adresse/filename.R')
>
> The difference between 'load' and 'attach'
> is that 'load' puts the contents of the file
> into your workspace (global environment, first

Not necessarily: see the envir argument.

> location on the search list), while 'attach'
> creates a new location on the search list.

location = environement here.

> But calling this 'filename.R' is likely to lead
> to trouble.  The '.R' suffix is usually used
> for files containing R commands that can be
> used by the 'source' function.
>
> The usual convention for files created by 'save'
> is to use a '.rda' suffix.

Or .RData or .Rdata for those not DOS-centric: see the examples in the 
help file.

>
> Pat
>
>> 
>> 
>> On Mon, Jun 14, 2010 at 12:41 PM,<khazaei at ceremade.dauphine.fr>  wrote:
>>> Hi all
>>> I saved the result of my code as a file, like
>>>> save(namefunction,file="adresse/filename.R").
>>>   I want to open the filename. Could you please help me how I can open the
>>> filename and see the result.
>>> 
>>> best
>>> Khazaei


-- 
Brian D. Ripley,                  ripley at 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 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-help mailing list