edit.data.frame

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

edit.data.frame

Fredrik Lundgren
Dear list,

Sometimes I have huge data.frames and the small spreadsheetlike
edit.data.frame is quite handy to get an overview of the data. However,
when I close the editor all data are rolled over the console window,
which takes time and clutters the window. Is there a way to avoid this?

Fredrik

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: edit.data.frame

Brian Ripley
On Thu, 12 Jan 2006, Fredrik Lundgren wrote:

> Sometimes I have huge data.frames and the small spreadsheetlike
> edit.data.frame is quite handy to get an overview of the data. However,
> when I close the editor all data are rolled over the console window,
> which takes time and clutters the window. Is there a way to avoid this?

If you mean printed to the R terminal/console, assign the result or use
invisible(edit(object)).


--
Brian D. Ripley,                  [hidden email]
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

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: edit.data.frame

Wincent
I think fix(data.frame.name) is the best way .

2006/1/13, Prof Brian Ripley <[hidden email]>:

> On Thu, 12 Jan 2006, Fredrik Lundgren wrote:
>
> > Sometimes I have huge data.frames and the small spreadsheetlike
> > edit.data.frame is quite handy to get an overview of the data. However,
> > when I close the editor all data are rolled over the console window,
> > which takes time and clutters the window. Is there a way to avoid this?
>
> If you mean printed to the R terminal/console, assign the result or use
> invisible(edit(object)).
>
>
> --
> Brian D. Ripley,                  [hidden email]
> 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
>
> ______________________________________________
> [hidden email] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>

--
黄荣贵
Deparment of Sociology
Fudan University


______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: edit.data.frame

Brian Ripley
That changes the object if you make a change in the editor, so definitely
NOT to be recommended.

On Fri, 13 Jan 2006, ronggui wrote:

> I think fix(data.frame.name) is the best way .
> 2006/1/13, Prof Brian Ripley <[hidden email]>:> On Thu, 12 Jan 2006, Fredrik Lundgren wrote:>> > Sometimes I have huge data.frames and the small spreadsheetlike> > edit.data.frame is quite handy to get an overview of the data. However,> > when I close the editor all data are rolled over the console window,> > which takes time and clutters the window. Is there a way to avoid this?>> If you mean printed to the R terminal/console, assign the result or use> invisible(edit(object)).>>> --> Brian D. Ripley,                  [hidden email]> 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>> ______________________________________________> [hidden email] mailing list> https://stat.ethz.ch/mailman/listinfo/r-help> PLEASE do read the posting guide! http://www.R-p!
> roject.org/posting-guide.html>
>
> --黄荣贵Deparment of SociologyFudan University
>
>

--
Brian D. Ripley,                  [hidden email]
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
______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: edit.data.frame

David Firth-2
In reply to this post by Fredrik Lundgren
On 12 Jan 2006, at 22:17, Fredrik Lundgren wrote:

> Dear list,
>
> Sometimes I have huge data.frames and the small spreadsheetlike
> edit.data.frame is quite handy to get an overview of the data.  
> However,
> when I close the editor all data are rolled over the console window,
> which takes time and clutters the window. Is there a way to avoid  
> this?
>

An alternative to the editor is showData() from the relimp package.  
It is modeless, meaning that your data window can be left open/
minimized while you work in R.  I haven't tested it with _very_ large  
data frames though.

David

--
Professor David Firth
http://www.warwick.ac.uk/go/dfirth

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: edit.data.frame - summary

Fredrik Lundgren
Thanks to

David Firth
Brian Ripley
ronggui
jim holtman

who help with this question.

showData() from the relimp package works and shows the dataframe "as.is"
but scrolls rather weak with huge data.frames (15 000 x 120)

fix(...) is somewhat dangerous as you usually don't want to correct
individual data but
get an overview

invisible(edit(...)) does the trick and scrolls with excellent speed
even with huge dataframes
but not exactly "as.is" (dates as negative or positive integer, minor
problem).

Fredrik



----- Original Message -----
From: "David Firth" <[hidden email]>
To: "Fredrik Lundgren" <[hidden email]>
Cc: "R-help" <[hidden email]>
Sent: Friday, January 13, 2006 9:21 AM
Subject: Re: [R] edit.data.frame


> On 12 Jan 2006, at 22:17, Fredrik Lundgren wrote:
>
>> Dear list,
>>
>> Sometimes I have huge data.frames and the small spreadsheetlike
>> edit.data.frame is quite handy to get an overview of the data.
>> However,
>> when I close the editor all data are rolled over the console window,
>> which takes time and clutters the window. Is there a way to avoid
>> this?
>>
>
> An alternative to the editor is showData() from the relimp package.
> It is modeless, meaning that your data window can be left open/
> minimized while you work in R.  I haven't tested it with _very_ large
> data frames though.
>
> David
>
> --
> Professor David Firth
> http://www.warwick.ac.uk/go/dfirth
>

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Reply | Threaded
Open this post in threaded view
|

Re: edit.data.frame - summary

Brian Ripley
On Fri, 13 Jan 2006, Fredrik Lundgren wrote:

> Thanks to
>
> David Firth
> Brian Ripley
> ronggui
> jim holtman
>
> who help with this question.
>
> showData() from the relimp package works and shows the dataframe "as.is"
> but scrolls rather weak with huge data.frames (15 000 x 120)
>
> fix(...) is somewhat dangerous as you usually don't want to correct
> individual data but
> get an overview
>
> invisible(edit(...)) does the trick and scrolls with excellent speed
> even with huge dataframes

It has been tested on tens of thousands of columns.

> but not exactly "as.is" (dates as negative or positive integer, minor
> problem).

Well, actually this is `as.is' and showData is not (and that _is_
documented on the help page).  If you want to see the printed
representation, call invisible(edit(format(your_df)))


A non-modal read-only version of the dataeditors would be a nice
programming exercise.

--
Brian D. Ripley,                  [hidden email]
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

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html