[R] how to explore contents of R data file from command line?

Prof Brian Ripley ripley at stats.ox.ac.uk
Mon Jan 29 14:46:07 CET 2007


On Mon, 29 Jan 2007, Vladimir Eremeev wrote:

> Thank you, I have used this way already.
> I would like to avoid copying files, as I have asked before.

attach("inflow.RData")
ls(2)
...
detach(2)


>
> I have found one more solution in Windows.
>
> Just typing inflow.RData (the file name) in command line and pressing enter
> runs Rgui, and it loads the file.
> Then ls() and str() will give the insight of the file contents.
> When exiting from R, one needs to say "No" to the R's question about saving
> workspace image, as answering "Yes" deletes older .RData (default workspace
> image).
>
>
> Henrique Dallazuanna wrote:
>>
>> You can try copy the file into another location and in the R:
>>
>> load(file.choose())
>> ls()
>>
>> choose the file .RData
>>
>> On 29/01/07, Vladimir Eremeev <wl2776 at gmail.com> wrote:
>>> Dear all,
>>>
>>> I have a directory with my research project, containing files
>>> .RData
>>> and
>>> inflow.RData
>>>
>>> I am just curious, is there any way to explore contents of
>>> inflow.RDatafrom
>>> command line without affecting .RData and
>>> without copying inflow.RData to
>>> another location?
>>> I can see names and character attributes (of something in the file) in a
>>> 3rd
>>> party raw file viewer.
>> Henrique Dallazuanna
>>
>
>

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